0 Replies Latest reply on Dec 22, 2008 6:40 AM by (Nicola_Cardi)

    [IDCS3] [VB] Problem with stroke vbscript

      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