Results 1 to 4 of 4

Thread: InDesign 2.0 VBScript Maybe You Can Help?

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2009
    Posts
    13

    InDesign 2.0 VBScript Maybe You Can Help?

    Hi,

    I am new to VB Scripting, so please bear with me. My experience and skills are limited.

    I posted this on the Adobe Forums, but haven't gotten a response. Maybe someone here can help, since it might be a VB thing, rather than an Adobe thing.

    In my Object Browser it says "Class PDFPlacePreferences
    Member of InDesign"

    I am trying to set the .pdf place options, and I can't figure out why the following code won't work. I did something similar in a Photoshop script I wrote, but can't figure out why this 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,

    ~Christopher

  2. #2

    Thread Starter
    New Member
    Join Date
    Aug 2009
    Posts
    13

    Re: InDesign 2.0 VBScript Maybe You Can Help?

    To make my question much more simple .... What is a Variant in VBScript, and how is it properly used?

    Maybe a sample?

    Thank-you

  3. #3
    New Member
    Join Date
    Sep 2009
    Posts
    1

    Re: InDesign 2.0 VBScript Maybe You Can Help?

    Set placePdfOptions = CreateObject("Indesign.pdfPlacePreferences")

    I think this line should be

    Set placePdfOptions = myIndesign.pdfPlacePreferences

  4. #4

    Thread Starter
    New Member
    Join Date
    Aug 2009
    Posts
    13

    Re: InDesign 2.0 VBScript Maybe You Can Help?

    Hey, thanks.

    I got this problem solved.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width