Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

Re: Can't get to add the data merge text placeholder to all the text frames on the document

$
0
0

Hi,

 

I think the main problem is index of textFrames (x) on your pages. Your code assumes top frame has index 0 and it grows going down...

This is often false, cause frame's index is applied while creation (last frame has index 0; not first)

 

So comparing textFrame[x].label to "captionY" is mostly false.

 

Check this one line code with your doc:

 

alert(myDocument.pages[0].textFrames[0].label)

 

It supposed to be 'caption1' but I am pretty sure it is not.

 

Jarek


Viewing all articles
Browse latest Browse all 37788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>