🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #17885

Re: Exporting a page (VB)?

#17885
From: Stu Bloom
Date: Sun, 11 May 2003 00:44
25 lines
1671 bytes
Thanks, but I can't get it to work.

First, it appears PDFExportPreferences is a property (or set of properties) that belongs to the Application object.

Second, when I try to execute the following code, InDesign goes south when it tries to execute the Export method the first time.

I can export the page in question just fine from the ID interface.

Can I assume that any PDFExportPreferences or PDFExportStyles that I don't explicitly set default to the current settings in ID?


Private Sub Command1_Click()
    Dim objID As InDesign.Application
    Dim objDoc As InDesign.Document
    Dim sPath As String
    Dim nPage As Long

Set objID = CreateObject("InDesign.Application")
    Set objDoc = objID.ActiveDocument
    sPath = objDoc.Path
    For nPage = 1 To objDoc.Pages.Count
        objID.PDFExportPreferences.PageRange = nPage
        objDoc.Export idExportPDF, sPath & "Page " & nPage & ".pdf"
    Next nPage
End Sub
Technical Details
Message-ID: <1de91360.1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de91360.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,a4391f1bc5cb54d4
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-05-10 18:07:42 PST
From: "Stu Bloom" <stu@earlvillepost.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Exporting a page (VB)?
Message-ID: <1de91360.1@WebX.la2eafNXanI>
Date: Sat, 10 May 2003 17:44:39 -0700
References: <1de91360.-1@WebX.la2eafNXanI>
Lines: 29
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit