🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #19918

Re: Creating tables on the fly, Windows InDesign

#19918
From: Olav Kvern
Date: Thu, 14 Nov 2002 18:59
11 lines
1581 bytes
GeekGod-- 

Sure. Use the Search method of the Document to look for a given character style, then iterate through the collection of found items it returns. For each found item, get the first InsertionPoint in the item & tell it to create the table. 

If you search the forum and/or forum archive for the variable name "myFoundItems", you'll turn up several examples where I've done just this. 

A couple of notes--if you simply want to turn the found item into a table, you can use myFoundItem.Tables.Add (provided that "myFoundItem" contains a reference to one of the text objects). Next, if you're adding paragraphs to a story, you'll want to iterate backwards through the collection of found items to avoid invalidating object references as you go. (A search for "backward" will probably turn up a few examples in this forum/forum archive.) 

Thanks, 

Ole
Technical Details
Message-ID: <1de68f3a.4@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de68f3a.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,734b037c90d04195
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-11-14 11:14:03 PST
From: "Olav Kvern" <okvern@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Creating tables on the fly, Windows InDesign
Message-ID: <1de68f3a.4@WebX.la2eafNXanI>
Date: Thu, 14 Nov 2002 10:59:54 -0800
References: <1de68f3a.-1@WebX.la2eafNXanI>
Lines: 21
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit