2 Replies Latest reply on Sep 25, 2009 3:48 AM by AdobeScripts

    pdfplaceoptions  ... InDesign 2.0 VBScript




      I am new at this stuff, so hopefully someone can help me. I realize probably no one is using ID2.0, but the priciples should still be the same.


      I am trying to set the .pdf place options, and I can't figure out why the following code won't work. I get the error: "ActiveX component can't create object: 'Indesign.pdfPlacePreferences'."


              imagetoplace = ccTiflocation&ccNumber&"COMPOSITE.PDF"
              set fso1 = CreateObject("Scripting.FileSystemObject")
              set folder = fso1.GetFolder(myTemplateDir)

              If fso1.FileExists (myTemplateDir&layout&".indd") then
                  Set myIndesign = CreateObject("Indesign.Application.2.0")
                  Set activeDocument = myInDesign.Open(myTemplateDir&layout&".indd")
                  Set placePdfOptions = CreateObject("Indesign.pdfPlacePreferences")

                  placePdfOptions.OpenDocumentPassword = ""
                  placePdfOptions.PageNumber = 1

                  placePdfOptions.PDFCrop = 1131573328 'IdCropPDF
                  placePdfOptions.PreserveHalftones = False

                  placePdfOptions.TransparentBackground = False


                  'Place Image
                  Set myWindow = myInDesign.ActiveWindow
                  Set mySpread = myWindow.ActiveSpread
                  'myBounds = Array("160mm", "400mm", "200mm", "110mm")
                  Set myPage = mySpread.Pages.Item(1)
                  myPage.Place imagetoplace, placePdfOptions


      Please, and Thank-you,