Is there more beautiful way to get reference for next para?
i have insertion point in paragraph.
now need know para style of next paras.
i use huge construction:
set mpara0 = myind.selection.item(1).paragraphs.item(1) 'para inder cursor
set mpara3 = mpara0.insertionpoints.item(-1).paragraphs.item(1) 'third para
set mpara3 = mpara3.insertionpoints.item(-1).paragraphs.item(1)
set mpara5 = mpara3.insertionpoints.item(-1).paragraphs.item(1) 'fifth para
set mpara5 = mpara5.insertionpoints.item(-1).paragraphs.item(1)
paraname3 = mpara3.paragraphs.item(1).appliedparagraphstyle.name
paraname5 = mpara5.paragraphs.item(1).appliedparagraphstyle.name
is there other way?
thanks.
interesting :-)
in js:
alert (app.selection[0].parentstory.paragraphs[app.selection[0].paragraphs[0].index+3].appliedp aragraphstyle.name);
shows name of style of 3rd paragraph after current one. adjust vb @ -- think should work same.
More discussions in InDesign Scripting
adobe
Comments
Post a Comment