Article View: adobe.scripting.indesign
Article #16111[VB] Creating an Index
From: DanielLutz emcp
Date: Thu, 16 Oct 2003 07:14
Date: Thu, 16 Oct 2003 07:14
16 lines
1586 bytes
1586 bytes
Hello All, I would like to create an index from scratch by the help of vb. I tried to adapt the example from the ID scripting guide. Unfortunately, it does not work for text in a table (and my document consists mainly of content placed in tables). I think the following part of the script causes the problem: Set myFoundObjects = myStory.Search(myString) For Each object In myFoundObjects Set myTopic = myIndex.Topics.Add(myString) myTopic.PageReferences.Add myStory, object.Index Next object It seems that myStory.Search(myString) returns the index of the occurences starting from the beginning of the cell (if myString is content in a table), while PageReferences.Add needs the index of the occurences starting from the beginning of the story. Does anyone have an idea how to solve this? I would be glad for any hint. Thanks a lot! Daniel
Technical Details
Message-ID:
<2ccde0b8.-1@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-05!sn-xit-08!supernews.com!easynet-quince!easynet.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.arcor-online.net!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,c5443d82f2063289,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-10-16 00:40:05 PST From: Daniel_Lutz_(emcp)@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-05!sn-xit-08!supernews.com!easynet-quince!easynet.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: [VB] Creating an Index Message-ID: <2ccde0b8.-1@webx.la2eafNXanI> Date: Thu, 16 Oct 2003 00:14:50 -0700 Lines: 24 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit