2 Replies Latest reply on Feb 27, 2012 4:05 PM by BigGunN

    frameFitting- what am I missing

    BigGunN Level 1

      I am missing something when it comes to syntax of framefitting. I am using CS5.5 and VBScript.  I found a past forum post here where they successfully did it with JS, but I can't seemed to get something right when moving it over to a VB syntax.


      I keep getting an OBJECT REQUIRED: 'EmptyFrameFittingOptions' error


      I have tried several variations without success, and here is my last attempt...


      set P1F2 = myPages.Item(1).Rectangles.Item(1)

      P1F2.name = "P1F2"

      P1F2.FillColor = myDocument.Swatches.Item("DGC1_446a")

      P1F2.frameFittingOptions.fittingOnEmptyFrame = EmptyFrameFittingOptions.FILL_PROPORTIONALLY

      P1F2.frameFittingOptions.fittingAlignment = AnchorPoint.CENTER_ANCHOR

      P1F2.Place "C:\\dmshoe1.png", false

      P1F2.ItemLayer = myDocument.Layers.Item("Block 1 Layer")


      Can anyone see what I am doing wrong.