1 Reply Latest reply on Jul 28, 2008 11:35 AM by (Rex_Bull)

    VB script Export as JPG

      I must be missing something simple.
      I am using Windows XP InDesigh CS2

      I am using an external script and want to export a document as a jpg.

      I can export an EPS or PFD with no issue but get an error when I try to export as jpg.

      Here is my code

      Set myInDesign = CreateObject("InDesign.Application.CS2")
      myInDesign.Activate

      '--1952403524 is PDF type
      '--1952400720 is EPS type
      '--1952409965 is ID Image type

      ' create EPS

      myFile = "C:\bob.eps"
      myInDesign.ActiveDocument.Export 1952400720, myFile, False

      ' generate a jpg

      myFile = "C:\bob1.jpg"
      myInDesign.ActiveDocument.Export 1952409965, myFile, False

      and her is the error I get
      ---------------------------
      Windows Script Host
      ---------------------------
      Script: C:\Documents and Settings\rjbull\Desktop\ID export.vbs
      Line: 22
      Char: 1
      Error: Invalid value for parameter 'Format' of event 'Export'. Expected idExportFormat enumerator or String, but received 1952409965.
      Code: 800A770D
      Source: C:\Program Files\Adobe\Adobe InDesign CS2\InDesign.exe

      ---------------------------
      OK
      ---------------------------