Skip to main content
Known Participant
December 4, 2011
Answered

Release all anchored objects at once

  • December 4, 2011
  • 8 replies
  • 32669 views

Dear All, I want to release an all anchored objects from my file. All anchors are created inside the table. I am using InDesign CS4.

I have a file for 4 pages which is containing more than 150 images to be released from anchored. That images should be placed in the same place. Only need to release. I want to do this for more than 100 files (400 pgs. it may increase in future). I tried this in Search/replace option using Object, but only i can able to find using custom option in the anchor options panel, not able to relase using search and replace.

Please help me ASAP.

Thanks in Advance, Thiru

Correct answer Marc Autret

Hi Pathi,

i have tested the above js code its working fine, But still i dont know what is your expectations. Can you please provide the snapshot before and after.

thx

csm_phil


Try this:

var a = app.activeDocument.allPageItems, t;

while( t = a.pop() )

    {

    t.isValid &&

    t.hasOwnProperty('anchoredObjectSettings') &&

    (t.parent instanceof Character) &&

    (t=t.anchoredObjectSettings).isValid &&

    t.releaseAnchoredObject();

    }

@+

Marc

8 replies

Participant
February 19, 2025

BIUTTT

Participant
August 9, 2024

Worked like a charm

Peter Kahrel
Community Expert
Community Expert
October 27, 2023

What's wrong with the script that Marc Autret posted (see the answer marked as correct)?

Inspiring
October 30, 2023

Woah!  I didn't see there was a correct script.  This is phenomenal!

Inspiring
October 25, 2023

There really needs to be a script to release ALL anchored objects in a document, similar to how Break All Text Threads works.

This script is very helpful, as you can release an anchored object with one click, but you still have to individually click on every single anchored object which is massively tedious.

https://creativepro.com/releasing-inlines/

Participant
September 27, 2021

Ravi

Participant
January 30, 2020

Here's my effort, building on Marc's work: https://gist.github.com/mhjb/5f78dee507754f0871891efe2c70d5ba

This script 'frees' & styles all anchored texts in a document, replacing anchors with the contained text

Participating Frequently
January 12, 2017

Wanted to add something to this old thread about the script to release all anchored objects.

If you double click it and nothing happens, it may be because the objects are considered un-releasable by InDesign. Like if you click one and go to the anchored objects menu, the release option is grayed out. This may be a bug or have to do with grouping.

You can fix it by clicking within the text box containing those objects, doing select all, and then going up to object - anchored object - Options. Then change the position dropdown to "Custom". At this point the objects may all collapse together since they no longer have their previous position settings... but they will now be allowed to release. At this point the script should work.

Participant
August 9, 2021

Thanks a lot!

 

Carolina Porto Ruwer
winterm
Legend
December 4, 2011

it seems your question already answered.

take a look here:

http://forums.adobe.com/message/2609468#2609468

mr_pathiAuthor
Known Participant
December 5, 2011

Thanks for your reply. But I am new to scripting, so i am not able to make that script completely. So could you plz give me the full code of the script?

For more information:

The file contains Inline anchored object and custom anchored objects in the table. And there is no link between frames. Each page having separate frame.

Marc Autret
Marc AutretCorrect answer
Legend
December 5, 2011

Hi Pathi,

i have tested the above js code its working fine, But still i dont know what is your expectations. Can you please provide the snapshot before and after.

thx

csm_phil


Try this:

var a = app.activeDocument.allPageItems, t;

while( t = a.pop() )

    {

    t.isValid &&

    t.hasOwnProperty('anchoredObjectSettings') &&

    (t.parent instanceof Character) &&

    (t=t.anchoredObjectSettings).isValid &&

    t.releaseAnchoredObject();

    }

@+

Marc