Article View: adobe.scripting.indesign
Article #18136Re: [VB] Placing Multiple Images into set templates
From: Brian Boyce
Date: Fri, 25 Apr 2003 13:46
Date: Fri, 25 Apr 2003 13:46
40 lines
2375 bytes
2375 bytes
Yes, the images will have the same naming format each time the script is run.
At my work, we create the large composite boards that High Schools buy to show all the members of a class -- and in InDesign, we have to place each image into a frame, one at a time.
So, I'm trying to create a script that will automatically place a specified file into a specified frame (with a label). Unfortunately, I'm stuck on the 'Set' statement after the 'For' statement. I reworked the script a bit this morning, but it's still not working. Thanks for your help, and here's the new code segment:
' This Line Declares the image name format
ImgName = "img.tif"
ImgNumber = 1
InDImageName = ImgNumber & ImgName
' This line declares the frame label format
LabelName = "img"
LabelNumber = 1
InDFrameName = LabelName & LabelNumber
' This line creates the variable for how many images to place,
' and also how many times to loop the placement.
InDHowMany = InputBox("How many images do you want placed into the composite?", "Composite Image Count", "15")
' This begins the looping placement script
For InDPlaceCount = 1 to InDHowMany
Set InDPageItem = InDDocument.AllPageItems.Item(InDPlaceCount)
' This finds the certain frame label
If InDPageItem.Label = InDFrameName Then
' This places the image
InDPageItem.Place("Q:\PROJECTS\script test\" & InDImageName)
' This ends the If\Then statement
End If
' This should cause the label and image numbers to progress
ImgNumber = ImgNumber + 1
LabelNumber = LabelNumber + 1
Next
Technical Details
Message-ID:
<1de8dd3e.1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!216.166.71.14.MISMATCH!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de8dd3e.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,458bf860275b79ec X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-04-25 07:08:02 PST From: "Brian Boyce" <promithius@hotmail.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!216.166.71.14.MISMATCH!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: [VB] Placing Multiple Images into set templates Message-ID: <1de8dd3e.1@WebX.la2eafNXanI> Date: Fri, 25 Apr 2003 06:46:00 -0700 References: <1de8dd3e.-1@WebX.la2eafNXanI> Lines: 48 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit