Article View: adobe.scripting.indesign
Article #19510Exporting to PDF
From: Michael LaFleur
Date: Fri, 13 Dec 2002 23:18
Date: Fri, 13 Dec 2002 23:18
38 lines
1813 bytes
1813 bytes
Greetings.
I have a little VBS script which places two files into frames within a starter document, and I would like it to export to PDF once it completes.
Rem Add formatted text at insertion points
Dim myInDesign
Set myInDesign =CreateObject("InDesign.Application.2.0")
Set myDocument =myInDesign.Documents.Open ("c:\starterdocument.indd")
Rem Enter header and body text.
myInDesign.Documents.Item(1).Spreads.Item(1).TextFrames.Item(1).Place = "c:\Header.TXT"
myInDesign.Documents.Item(1).Spreads.Item(1).TextFrames.Item(2).Place = "c:\Body.TXT"
Rem Export to PDF
Rem and PDF export style name in the following line:
Set myDocument =myInDesign.ActiveDocument
myInDesign.PDFExportStyles.Item("Datasheet")
myDocument.Export idExportPDF,"c:\myPDF.pdf",False
When I run the script, it places the files correctly, but returns the error:
Script: path to script
Line: 12
Char: 1
Error: Unspecified
Error Code: 80004005
What am I doing wrong?
Thanks in advance!
Technical Details
Message-ID:
<1de7008c.-1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!205.215.62.125.MISMATCH!in.100proofnews.com!in.100proofnews.com!fr.clara.net!heighliner.fr.clara.net!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,e710055a5eda2149,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-12-13 15:37:49 PST From: "Michael LaFleur" <mike.lafleur@famis.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!205.215.62.125.MISMATCH!in.100proofnews.com!in.100proofnews.com!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Exporting to PDF Message-ID: <1de7008c.-1@WebX.la2eafNXanI> Date: Fri, 13 Dec 2002 15:18:28 -0800 Lines: 36 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit