Article View: adobe.scripting.indesign
Article #16657VB How to delete every table and sth else?
From: Alex Bu
Date: Thu, 07 Aug 2003 01:01
Date: Thu, 07 Aug 2003 01:01
36 lines
1939 bytes
1939 bytes
Hi there,
I'm writing a script right now that converts every text on a page into outlines and then deletes the left tables. Now I'm having trouble with the table delete part. Any ideas how to start?
Dim MyIndesign
Set MyIndesign = CreateObject("InDesign.Application.2.0")
Set myDocument = myInDesign.ActiveDocument
REM Unlock all Layers
Set myLayers = myDocument.Layers
For Each Layer In myLayers
Layer.Locked = False
Next
REM Ungroup everything
For InDGroupCount = myDocument.Groups.Count to 1 Step -1
Set InDG = myDocument.Groups.Item(InDGroupCount)
InDG.Ungroup
Next
REM Convert every text on Page into outline
For InDOutlineCount = myDocument.TextFrames.Count to 1 Step -1
Set InDOutline = myDocument.TextFrames.Item(InDOutlineCount)
InDOutline.CreateOutlines
Next
REM How to delete all tables in the Document?
MsgBox ("Finished!")
Btw, is the CreateOutline Part correct? Does it really take every text into account?
Sometimes I wish you could just simulate keyboard commands via script. I know it's not good programming, but would make things easier sometimes for a programming newbie like me ;-) Well, I'm sure it's possible somehow...
Thanks in advance,
Alex
Technical Details
Message-ID:
<1dea3a8e.-1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!in.100proofnews.com!in.100proofnews.com!nntp.infostrada.it!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,a8b7eff996a000c7,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-08-06 18:07:49 PST From: "Alex Bu" <12three@gmx.de> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!in.100proofnews.com!in.100proofnews.com!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: VB How to delete every table and sth else? Message-ID: <1dea3a8e.-1@WebX.la2eafNXanI> Date: Wed, 6 Aug 2003 18:01:06 -0700 Lines: 42 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit