1 Reply Latest reply on May 14, 2018 4:24 AM by Ten A

    vbscript - export of multiple files at once

    diabollo

      Hello all,

      I made a script that will export to pdf all open projects.

      I do it one by one, I wonder if it can be done faster - several at a time.

      The idea is that the main scripts run several scripts (threads) just to make it work I need to know how to write a reference to an object (an indd file in a specific location).

      For now, I have:

      set myInDesign = CreateObject("InDesign.Application")
      For myDocumentCounter = 1 To myInDesign.Documents.Count
      myInDesign.Documents.Item(myDocumentCounter).Export idExportFormat.idPDFType, "file_name", False, myInDesign.pdfExportPresets.item("111")
      Next
      

      I would like to do something like this:

      set myInDesign = CreateObject("C:/file_path/file_name.indd")
      For myDocumentCounter = 1 To myInDesign.Documents.Count
      myInDesign.Documents.Item(myDocumentCounter).Export idExportFormat.idPDFType, "file_name", False, myInDesign.pdfExportPresets.item("111")
      Next
      

      Then I will be able to run it many times, changing only the path to the file.