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

Re: Search text variable and replace it with another text variable

$
0
0

HI,

 

Ok. Got your point, sorry...

As i wrote - not familiar with VBA but as JS it could be like this:

var      doc = app.activeDocument, destCell, currFile, currRec, currImage, i,      mVarA = doc.textVariables.item("variableA"),     mVarB = doc.textVariables.item("variableB"),     mVarAinst = mVarA.associatedInstances,     len = mVarAinst.length; while (len-->0) mVarAinst[len].associatedTextVariable = mVarB;

 

mVarAinst is an array of varA instances ==> no need to search them across entire doc

 

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>