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

Re: insert or replace last content

$
0
0

whoo.. well that is a bit more complicated.

For each

result you have to test first

if the next paragraph bulletsAndNumberingListType is not ListType.BULLET_LIST.

if so, myResult[i].changeGrep();

 

Remember always to iterate your array from the back. also there are quite a bit of catches. for example if the list is the last paragraph in the story, using paragraphs.nextItem() will return a invalid object. also of notice is the fact that the"nextItem()" method on colections is horribly slow, so for a large document you ether have to writhe your own method of getting the next paragraph, or have tons and tons of patience.

 

if this is a one time use only script or even a rarely used script, i say it's just not worth the trouble.


Viewing all articles
Browse latest Browse all 37788

Trending Articles



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