0 Replies Latest reply on Mar 30, 2015 2:23 PM by JamesHaney

    Issue with "afterOpen" eventListener


      I have read of of the posts which describe the issues with "afterOpen" not really working as expected.

      Also, I have heard from some who have said that by referring to the current document like this: var doc = app.documents[0];


      I am working on a script that does the following:


      Assuming that a document's XMP metadata has been updated by means of Bridge or a Digital Asset Management system while the document was closed

      Upon a new document opening

      Read several XMP values from the MetaData of the document

      Update several applicable textVariable items in the document

      Such that the updated values are now displayed where the textVariable tags are inserted.


      Everything works, the values are updated. If I run a separate little script in InDesign that checks the value of the XMP fields, or the text Variables, the values show the updated data.


      But, upon opening, the document still shows the tagged text with whatever the values were the last time the document is saved.


      I can't seem to find any way around it.


      Anyone have any ideas?