Article View: adobe.scripting.indesign
Article #19904Going to the end of a long story
From: Greg Brunet
Date: Thu, 14 Nov 2002 09:48
Date: Thu, 14 Nov 2002 09:48
21 lines
1732 bytes
1732 bytes
I am trying to find the Page, Column, and vertical location of the end of a long story. I generate the text as a tagged file, then place it into my document as follows:
myInDesign.TaggedTextImportPreferences.StyleConflict = InDesign.idTagFileDefinition
myTF.Place sName, , myLayer, False, False, True, True
Then I try to get to the end of it:
Set myStory = myTF.ParentStory
Set myChar = myStory.Characters.Item(-1)
'** same as this, right?
' Set myChar = myStory.Characters.Item(myStory.Characters.Count - 1)
The problem is that InDesign never comes back to my application (an I've waited at least 3x as long as it took to import the text). I got the value of myStory.Characters.Count & it's = 559411. Is this too long for InDesign to handle? How else can I get to the end without having it lock up? I'm thinking that maybe I should find the last TextFrame in the story, and find the last character in it. Even if I find a workaround - why does InDesign seem to have a problem with what I'm doing?
Thanks for the help,
-- Greg
Technical Details
Message-ID:
<1de6978d.-1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!WebXShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,bc9f609b51ff0229,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-11-14 02:26:08 PST From: "Greg Brunet" <gbrunet@sempersoft.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Going to the end of a long story Message-ID: <1de6978d.-1@WebX.la2eafNXanI> Date: Thu, 14 Nov 2002 01:48:25 -0800 Lines: 25 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit