Article View: adobe.scripting.indesign
Article #18045Re: [VB] Placing Multiple Images into set templates
From: Brian Boyce
Date: Fri, 25 Apr 2003 16:03
Date: Fri, 25 Apr 2003 16:03
57 lines
2596 bytes
2596 bytes
Roberto,
your code works in VB, except that it seems to go from the last frame to the first when it places. also, when I try to convert it to VBScript, it gives me an 'unrecognized character' error. I still don't know enough about VB to trouble shoot that one.
Iolaire,
your code works, mine still doesn't ::confused:: It places an image, but it doesn't loop the image name. Here's what I have so far:
Dim InD
Set InD = CreateObject("InDesign.Application.2.0")
If InD.Documents.Count <> 0 Then
Set InDWindow = InD.ActiveWindow
Set InDSpread = InDWindow.ActiveSpread
Set InDDocument = InD.ActiveDocument
Set InDPage = InDDocument.Pages.Item(1)
' This 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", "2")
' This begins the looping placement script
For InDPlaceCount = 1 To InDDocument.Rectangles.Count 'step 1
Set InDRec = InDDocument.Rectangles.Item(InDPlaceCount)
Rem found this code at:
Rem Chris Haas "Different rounded corners" 1/25/03 6:31pm
' Set InDPlaced =
InDRec.Place("Q:\PROJECTS\script test\" & InDImageName)
' This should cause the label and image numbers to progress
ImgNumber = ImgNumber + 1
LabelNumber = LabelNumber + 1
Next
' End of Script
Else
MsgBox "Please open a document and try again."
End If
Thanks for the help guys!
Technical Details
Message-ID:
<1de8dd3e.9@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!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 09:07:52 PST From: "Brian Boyce" <promithius@hotmail.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!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.9@WebX.la2eafNXanI> Date: Fri, 25 Apr 2003 09:03:55 -0700 References: <1de8dd3e.-1@WebX.la2eafNXanI> Lines: 62 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit