🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #15700

Re: Adding a column within a table

#15700
From: Olav_Kvern
Date: Fri, 21 Nov 2003 02:03
16 lines
1546 bytes
Dave--

Whoa, wait, hold the phone, etc.! When I examined this problem further, I found that, once again, scripting mirrors the user interface. When you add a column, you select a column and choose Insert>Column. InDesign gives you a choice of adding the new column to the left or right of the selected column. When you select a table, you can only add a column at the beginning or end of a table. So we've been barking up the wrong tree--we need to tell a *column* to add the new column, as in:



var myTable=app.documents.item(0).stories.item(0).tables.item(0);  
var myColumn = myTable.columns.item(1).columns.add(LocationOptions.atBeginning);

"atEnd" also works, and adds the column to the right of the specified column.

Once again, researching what happens in the UI clears up scripting mysteries!

Thanks,

Ole
Technical Details
Message-ID: <2cce81b1.6@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webx
References: <2cce81b1.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,620333df8eace87c
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-11-20 18:07:47 PST
From: Olav_Kvern@adobeforums.com
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!uio.no!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: Re: Adding a column within a table
Message-ID: <2cce81b1.6@webx.la2eafNXanI>
Date: Thu, 20 Nov 2003 18:03:15 -0800
References: <2cce81b1.-1@webx.la2eafNXanI>
Lines: 22
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit