🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #2321

Re: CS3 Javascript - finding the paragraph which contain the index page reference

#2321
From: Dave_Saunders
Date: Fri, 26 Dec 2008 01:45
8 lines
983 bytes
I don't get it. The paragraphs are just as likely to change if you're contemplating later editing.

Anyway, the way to get the number of paragraphs is:

myPara = app.activeDocument.indexes.item(0).topics.item(0).pageReferences.item(0).sourceText.paragraphs[0]
myPcount = myPara.parent.texts.itemByRange(0, myPara.index).paragraphs.length;

Dave
Technical Details
Message-ID: <59b75803.4@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing
References: <59b75803.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,4423827cf06ba747
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Dave_Saunders@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: CS3 Javascript - finding the paragraph
 which contain the index page reference
Message-ID: <59b75803.4@webcrossing.la2eafNXanI>
Date: Thu, 25 Dec 2008 17:45:42 -0800
References: <59b75803.-1@webcrossing.la2eafNXanI>
Lines: 11
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit