Article View: adobe.scripting.indesign
Article #16083Re: Placing 1 image per document page
From: Chris_Haas
Date: Wed, 15 Oct 2003 02:42
Date: Wed, 15 Oct 2003 02:42
30 lines
2156 bytes
2156 bytes
I don't have a good resource except for the scripting guide on the ID site.
But here's a quick example for you to try. Just change the folder listed
below. Be sure to include a trailing slash! Copy below and save it to your
desktop as "Test.vbs". Then open ID with a document that has as many pages
as you need. Then just simply double-click the VBS file. I put comments in
the file that hopefully might give you an understanding of what's going on.
This is a very simple script that doesn't worry about sizing the images or
placing them at a specific location. It also doesn't make sure that the
images exist in the first place so make sure they do before running it. If
you have any questions this is a good place to ask them. Good luck!
Option Explicit
Dim myIA
Dim myID
Dim myPages
Dim myPage
CONST myImageFolder = "C:\Documents and Settings\Chris
Haas\Desktop\Numbers\"
'Create an instance of the InDesign Application in the variable "myIA"
Set myIA = CreateObject("InDesign.Application.2.0")
'Point the variable "myID" to the current document
Set myID = myIA.ActiveDocument
'Loop through each page (represented by "myPage") in the document
For Each myPage in myID.Pages
'Place image
myPage.Place myImageFolder & myPage.Name & ".tif"
Next
Technical Details
Message-ID:
<895E89543A66A687A815EF17F66D6728@in.webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2ccddc8b.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,a513381a4562e8b5 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-10-14 20:07:38 PST From: Chris_Haas@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!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: Placing 1 image per document page Message-ID: <895E89543A66A687A815EF17F66D6728@in.webx.la2eafNXanI> Date: Tue, 14 Oct 2003 19:42:13 -0700 References: <2ccddc8b.-1@webx.la2eafNXanI> Lines: 32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit