🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #17429

Re: Script to print pages

#17429
From: roberto soto
Date: Wed, 11 Jun 2003 12:19
21 lines
1607 bytes
Hi,

In VB you can try this:
(put in the folder only ID documents and no more than 255 of them, otherwise you need to handle the errors in the script when file is not ID file)

Set myInDesign = CreateObject("InDesign.Application.2.0")
    Set myFileSystemObject = CreateObject("Scripting.FileSystemObject")
    ' Assuming this is the folder with ID documents
    Set myFolder = myFileSystemObject.GetFolder("C:\Test")

myInDesign.UserInteractionLevel = idDontDisplayAlerts
    For Each File In myFolder.Files
        DoEvents
        Set myDocument = myInDesign.Open(File.Path)
        'Set the printer style before, I using "book"
        myDocument.PrintOut idPrintWhitoutDialog, "Book"
        myDocument.Close
    Next
    myInDesign.UserInteractionLevel = idDisplayAlerts

Roberto
Technical Details
Message-ID: <1de96a17.3@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de96a17.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,83e544207eba7d74
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-06-11 05:37:44 PST
From: "roberto soto" <roberto1soto@hotmail.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Script to print pages
Message-ID: <1de96a17.3@WebX.la2eafNXanI>
Date: Wed, 11 Jun 2003 05:19:05 -0700
References: <1de96a17.-1@WebX.la2eafNXanI>
Lines: 23
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit