🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #16693

Re: VB How to delete every table and sth else?

#16693
From: pjredman
Date: Thu, 14 Aug 2003 13:39
19 lines
1225 bytes
Alex,

Try something like this:

Dim myInDesign As InDesign.Application
Set myInDesign = CreateObject("InDesign.Application.2.0")
Set myDocument = myInDesign.ActiveDocument
For Each Story In myDocument.Stories
Set myStory = Story
For Each Table In myStory.Tables
Set myTable = Table
TableDelete = myTable.Delete
Next Table
Next Story

Note that For Each is limited to 256 iterations so if you have more than 256 Stories or tables you'll want to use a For statement.

Thanks,
Phil Redman
Technical Details
Message-ID: <1dea3a8e.0@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1dea3a8e.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,a8b7eff996a000c7
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-08-14 07:08:10 PST
From: pjredman <pjredman@usgs.gov>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: VB How to delete every table and sth else?
Message-ID: <1dea3a8e.0@WebX.la2eafNXanI>
Date: Thu, 14 Aug 2003 06:39:59 -0700
References: <1dea3a8e.-1@WebX.la2eafNXanI>
Lines: 20
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit