🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #18492

Re: VB6: placing multiple images

#18492
From: Olav Kvern
Date: Mon, 17 Mar 2003 08:37
36 lines
1841 bytes
John--

What you need to do doesn't really have to do with InDesign scripting--it's fundamental Visual Basic scripting. Since you got the file name from a CommonDialog control, you can also get the path (that's another property of the control). Since you know the pattern of the file name, you can simply make a new file path using the path + the file name.

I don't have my Windows machine with me (I'm at an Adobe geek get-together in San Jose), so this probably won't be perfect, but try something like this:



myFilePattern = "sampleimage.tif" 
myPath = CommonDialog1.Path 
myFileName = myPath & "02" & myFilePattern 




It's just a matter of combining strings. To generate the file names in a loop, try something like:



myFilePattern = "sampleimage.tif" 
myPath = CommonDialog1.Path 
For myCounter = 1 to 20 
If myCounter < 10 then 
myFileName = myPath & "0" & cstr(myCounter) & myFilePattern 
Else 
myFileName = myPath & cstr(myCounter) & myFilePattern 
End If 




Hope this helps!

Thanks,

Ole
Technical Details
Message-ID: <1de8524d.0@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!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
References: <1de8524d.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,67cc264116b57e96
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-03-17 00:37:29 PST
From: "Olav Kvern" <okvern@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!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: Re: VB6: placing multiple images
Message-ID: <1de8524d.0@WebX.la2eafNXanI>
Date: Mon, 17 Mar 2003 00:37:04 -0800
References: <1de8524d.-1@WebX.la2eafNXanI>
Lines: 35
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit