Article View: adobe.scripting.indesign
Article #8625Re: Get (relative) index of a paragraph inside a selection of paragraphs
From: Dave_Saunders
Date: Sun, 01 Oct 2006 16:30
Date: Sun, 01 Oct 2006 16:30
11 lines
1119 bytes
1119 bytes
To answer your actual question, I believe you can get the index like this: The trick is The trick to find a paragraph reference is to count the paragraphs in the text: mytext.paragraphs.length For example, if you have a text selection and some insertion point within that selection, you might say: mytext = app.selection[0].characters.itemByRange(app.selection[0].index,myIP.index).texts[0]; Dave
Technical Details
Message-ID:
<3bc1d60c.4@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!multikabel.net!feed20.multikabel.net!news.germany.com!news.mb-net.net!open-news-network.org!news.isoc.lu!webcrossingReferences:
<3bc1d60c.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,11f901afe18132ac X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: Dave_Saunders@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!multikabel.net!feed20.multikabel.net!news.germany.com!news.mb-net.net!open-news-network.org!news.isoc.lu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: Get (relative) index of a paragraph inside a selection of paragraphs Message-ID: <3bc1d60c.4@webcrossing.la2eafNXanI> Date: Sun, 1 Oct 2006 09:30:17 -0700 References: <3bc1d60c.-1@webcrossing.la2eafNXanI> Lines: 15 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit