Skip to main content
Participating Frequently
September 17, 2013
Answered

Help with a script to unlink 'Place and Link' content

  • September 17, 2013
  • 1 reply
  • 1929 views

Hi

I need a script that will unlink content that has been placed into an indesign document using the ‘Place and Link’ feature.

I know that I can manually go to the link panel, select the linked content there and click on ‘unlink’ in the panel menu. However I have around 200 indesign documents which are all full of content that has been ‘Placed and Linked’. One I get a script to unlink content I can add it to a batch routine to do the folder of 200.

Can anybody help please.

Cheers

This topic has been closed for replies.
Correct answer Vamitul

like this?

app.activeDocument.links.everyItem().unlink();

1 reply

Vamitul
VamitulCorrect answer
Legend
September 17, 2013

like this?

app.activeDocument.links.everyItem().unlink();

Participating Frequently
September 17, 2013

Hi

That does kind of work. Your script does remove or unlink the 'Place and Link' content, but it also embeds the images that are in the document. So I think the script needs a bit more. I'm a bit poor at writing scripts so I'm sure there is a better way of doing the following:

app.activeDocument.links.everyItem().unlink()

app.activeDocument.links.everyItem().unembed()

So the first line of the above will unlink every item. Removing the 'Place and Link' content but embedding other images. The second line will then unembed these images.

This does work, but is there a nicer way of writing it?

Thanks for help.

Vamitul
Legend
September 17, 2013

nicer than two lines?!?