I am having problems converting my old VB script to a CS4 version.
The part that updates the links in my document isn't compatible anymore with CS4.
I know that CS4 handles linked files differently than previous versions, but I figure out how to make it CS4 compatible.
My script does the following:
- open InDesign
- open file
- update all links (these are +/- 75 tagged text files)
- save file as EPS file
- close InDesign file without saving
- close InDesign application
rem Open InDesign and File
Set myInDesign = CreateObject("InDesign.Application.CS4")
Set myDocument = myInDesign.open("C:\files\InDesignDocument.indd",False)
rem Update all links
For each link in myDocument.Links
On error resume next
rem Save file as EPS
myInDesign.EPSExportPreferences.EPSColor = 1129142603
rem Close document without saving and quit InDesign
Is there someone who can help me with this?
Thanks in advance,
in CS4 - you can't update link - if it doesn't need to be updated bug or feature
on error resume next
for a = myDocument.Links.Count to 1 step -1
on error goto 0
and - like in my example - don't use For Each because there is bug - no more than 255(256?) items will be processed
Thank you very much Robin, you saved the day!
It works like a charm!