This content has been marked as final. Show 3 replies
If you're using a Text Variable to define the product number, then what are you finding/replacing? Just change the definition of the text variable.
hi, how do i do it using VB. I defined two text field for each prodcut in the VB. can you help me providing the script to change the definition of the text variable.
If you're changing more than a couple of small pieces of text, it might be easier to do a XML merge. If the changes you're making are more minimal, you might be able to write the variable's value (text) directly to an existing text frame. I've never done this (I'm new to scripting ID myself), but it sounds plausible. Lastly, you should be able to automate a search-and-replace if you only want to replace the product number throughout the document. I don't have code for any of this, but if you look through the ID object model (see a thread that I started regarding this for resources) you should be able to find what you need.
Be aware also, that if you use the search-and-replace approach, and you're replacing a "dummy" or "placeholder" value, the second time around that placeholder will have been replaced with the "live" data--so it won't work twice, unless you're working from some sort of "template" document which you're re-saving to a different filename.