Article View: adobe.scripting.indesign
Article #18491VB6: placing multiple images
From: John Kallios
Date: Mon, 17 Mar 2003 01:58
Date: Mon, 17 Mar 2003 01:58
32 lines
2212 bytes
2212 bytes
Background: I have 20 images that I need to create a new document and place into frames. The images are 1st numbered for my ease of tracking them. (exmaple sampleimage.tif name 01sampleimage.tif)
Goal: is to place the images by referring to them as 01*, 02*, and so on for the 20 images.
Working script
Dim myInDesign As InDesign.Application
Set myInDesign = CreateObject("InDesign.Application.2.0")
Rem Create a new publication and assign it to the variable "myDocument"
Set myDocument = myInDesign.Documents.Add
Set myrectangle = myDocument.Spreads.Item(1).Rectangles.Add
Rem Specify the size and shape of the object frame
myrectangle.GeometricBounds = Array(".25in", ".25in", "2.25in", "3.75in")
myFile = CommonDialog1.FileName
Set myImage = myrectangle.place(myFile)
Set myrectangle = myDocument.Spreads.Item(1).Rectangles.Add
myrectangle.GeometricBounds = Array(".25in", "4in", "2.25in", "7.5in")
myFile = (????)
Set myImage = myrectangle.place(myFile)
???? referrs to "I have no Idea what to enter here for the 02 image"
I am using the common dialogue open box to find the path of the first image.
Am I following the correct path? Is there a better way to go about achieving this?
WARNING!!
Ultra Newbie! (Soon to be a pain in the <blank> to the regulars)
John
PS Did not find topic in the archives, so please excuse if I missed it. If the answer is read the scripting guide, rest assured, I am working on it.
Technical Details
Message-ID:
<1de8524d.-1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!newsfeed.telusplanet.net!xmission!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,67cc264116b57e96,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-03-16 18:07:35 PST From: "John Kallios" <john@orionprinting.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!cyclone.bc.net!newsfeed.telusplanet.net!xmission!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: VB6: placing multiple images Message-ID: <1de8524d.-1@WebX.la2eafNXanI> Date: Sun, 16 Mar 2003 17:58:49 -0800 Lines: 40 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit