Article View: adobe.scripting.indesign
Article #18042Re: [VB] Placing Multiple Images into set templates
From: Iolaire McFadden
Date: Fri, 25 Apr 2003 14:47
Date: Fri, 25 Apr 2003 14:47
46 lines
2196 bytes
2196 bytes
ok this code should actually work (make sure you uncomment the image name area and set it back how you need the image path:
Public myInDesign As InDesign.Application
Public myDocument As InDesign.Document
Sub da()
Set myInDesign = CreateObject("InDesign.Application.2.0")
Set myDocument = myInDesign.ActiveDocument
Rem hard coded image name for testing
Rem fix
ImgName = "PB100BL.JPG"
Rem uncomment this
'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 InDHowMany
'Set InDPageItem = InDDocument.AllPageItems.Item(InDPlaceCount)
Set myID = myInDesign.ActiveDocument
Set myIR = myID.Rectangles.Item(InDFrameName)
Rem found this code at:
Rem Chris Haas "Different rounded corners" 1/25/03 6:31pm </cgi-bin/webx?13@@.1de77e3e/0>
Set myTable1 = myIR.Place("M:\" & InDImageName)
' This should cause the label and image numbers to progress
ImgNumber = ImgNumber + 1
LabelNumber = LabelNumber + 1
Next
End Sub
I used the Rectangle Frame tool to draw my frames not the text frame tool.
iolaire
Technical Details
Message-ID:
<1de8dd3e.5@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!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 08:07:46 PST From: "Iolaire McFadden" <imcfadden@costar.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!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.5@WebX.la2eafNXanI> Date: Fri, 25 Apr 2003 07:47:49 -0700 References: <1de8dd3e.-1@WebX.la2eafNXanI> Lines: 50 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit