6 Replies Latest reply on May 15, 2008 10:53 AM by (SamCKayak)

    Filling today's date on document open (Acrobat 8)

      I'm experienced in JavaScript but new to Acrobat JavaScript.

      I want to fill in a text field with today's date on document open. I've tried two methods:

      1 - Adding a document function... How do I call it on doc open?
      function documentStart() {
      var sDate = util.printd("mm/dd/yyyy", new Date());
      this.getField("Today").value = sDate;
      }

      2 - Add a custom calculation script to the text field. This seems to update the field but only when printed, not when the document opens.

      Help... ?