Article View: adobe.scripting.indesign
Article #15495Question re page numbering [VB] ID 2.0.2
From: Iolaire_McFadden
Date: Fri, 05 Dec 2003 18:41
Date: Fri, 05 Dec 2003 18:41
16 lines
1818 bytes
1818 bytes
Hello, This quarter I've tried to streamline my automation by identifying and deleting unnecessary pages using objects on that page. For example to delete the Stats_Page, I first find the page number of the page containing the Stats_Page text frame:
deletePage = myDocument.TextFrames.Item("Stats_Page").Parent.Name
myDocument.Pages.Item(deletePage).Delete
To make this work I have to set the InDesign options to "View: Absolute Numbering" otherwise it will delete by the page number on the page which due to sectional numbering is incorrect. However this now breaks my Table of Contents which reflects page numbers based on Absolute numbering not the sectional numbering I set up:
Set mytocframe = myDocument.TextFrames.Item("TOC Frame_1")
myBounds = mytocframe.GeometricBounds
myTopEdge = myBounds(0)
myLeftEdge = myBounds(1)
Set tocEntry = myDocument.TOCStyles.Item("BaseTOC")
Set update_the_toc = myDocument.CreateTOC(tocEntry, True, , Array(myTopEdge, myLeftEdge))
Set update_the_toc = Nothing
End Sub
Please does anyone have a suggestion on how to delete pages based on the object they contain and have sectional table of contents page numbers work? Using Visual Basic & ID 2.0.2.
Thanks,
iolaire
Technical Details
Message-ID:
<2ccec433.-1@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!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,e2801a5e87fe524b,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-12-05 11:09:10 PST From: Iolaire_McFadden@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Question re page numbering [VB] ID 2.0.2 Message-ID: <2ccec433.-1@webx.la2eafNXanI> Date: Fri, 5 Dec 2003 10:41:02 -0800 Lines: 26 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit