Article View: adobe.scripting.indesign
Article #2284Problem with stroke vbscript
From: Nicola_Cardi
Date: Mon, 22 Dec 2008 14:40
Date: Mon, 22 Dec 2008 14:40
28 lines
1895 bytes
1895 bytes
I am trying to paginate images from an excel file which contains the images names
In order to do that I created the following script
Dim myInDesign As InDesign.Application
Set myInDesign = CreateObject("indesign.application")
Dim myDocument As InDesign.Document
Set myDocument = myInDesign.Documents.Add
Dim myPage As InDesign.Page
For j = 1 to lastrow
Set myPage = myDocument.Pages(CInt(Cells(j, 3))) ' column 3 contains the page number
Set myRectangle = myPageM.Rectangles.Add
Filename = Path & Cells(j, 12) 'column 12 contains file name
Set myGraphic = myRectangle.Place(Filename)
MyArray = Array(CDbl(Cells(j, 7).Value) & "mm", CDbl(Cells(j, 6).Value)& "mm", CDbl(Cells(j, 11).Value) & "mm", CDbl(Cells(j, 10).Value) & "mm")
'columns 7,6,11,10 contain x1,y1,x2,y2 values
myRectangle.GeometricBounds = MyArray
Ft = Cells(j, 21) ' column 21 contains fitting numeric option
myRectangle.Fit CLng(Ft)
myRectangle.Fit 1667591779 'it center the content
myRectangle.StrokeWeight = CDbl(Cells(j, 13))
'NOW HERE IS THE PROBLEM: column 13 contains the stroke weight which may be 0,1,0.5 or 2. In any case the pagination returns 0...I can't understand why, anyone can help me? Everything works fine but not the strokeweight application....what am I doing wrong????
Next j
Thanks
Nicola
Technical Details
Message-ID:
<59b75529.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!news.glorb.com!newshub.sdsu.edu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,76db9d47d900e121,start X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Nicola_Cardi@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news2.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Problem with stroke vbscript Message-ID: <59b75529.-1@webcrossing.la2eafNXanI> Date: Mon, 22 Dec 2008 06:40:02 -0800 Lines: 35 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit