Quantcast
Channel: Adobe Community: Message List - FrameMaker Scripting
Viewing all articles
Browse latest Browse all 3715

Re: Replacing all text in book with sample text

$
0
0

You have to set oDoc.TextSelection to a text range before methods like Clear or Copy have any effect: they take the current TextSelection as the range on which they are applied. The flags in the Clear and Copy methods define options for the method, such as suppressing any warnings that might otherwise occur or what to do with hidden text.

 

That is why nothing is deleted if you do not set oDoc.TextSelection. What you can try is replace the 0 flag in oDoc.Clear with Constants.FF_VISIBLE_ONLY and let me know if that solves the problem.

 

About an earlier question: the oTexts array that is returned by the GetText method contains text string objects and each of them has a property "offset" which gives the offset within the current paragraph.

 

Good luck

 

Jang


Viewing all articles
Browse latest Browse all 3715

Trending Articles



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