10 Replies Latest reply on Jan 20, 2017 12:08 AM by Loic.Aigon

    Write metadata in indb (indesign book) by an extendscript

    jessevic

      Hello,

       

      I found a manner to insert metadata in the File info of a document, but I search for a manner to do that on book level.

      Is there a possibility to do that? In my code below, extendscript crashes on the line "if (book.textVariables".

      I also did not found an answer on the internet if it is possible or not.

       

      Kind regards

       

       

       

      var book=app.activeBook

      var myText=prompt("Installation manuals, Operation manuals, Installer reference guide, User reference guide, Option handbooks, General safety precautions, Declaration of Conformity. In case you have an Information and operation manual, you must input Installation manuals; Operation manuals (remark the ;)","Installation manuals","Fill in the required tags");

      if (book.textVariables.item('Document Title').isValid){

          book.textVariables.item('Document Title').variableOptions.contents = myText;

      }

      else {

          // there's no variable named 'Document Title'

      }