6 Replies Latest reply on Feb 2, 2018 3:05 AM by try67

    Why display message confirm save after ExecuteThisJavascript?

    daitranthanhoa Level 1

      Dim iTotalPage = gPdDoc.GetNumPages

       

      For iPage = 0 To iTotalPage - 1

              Dim formApp As AFORMAUTLib.AFormApp

              formApp = CreateObject("AFormAut.App")      

              Dim fields As AFORMAUTLib.Fields

              fields = formApp.Fields

       

              Dim strScript As String

              Dim tmp = "var p=" & iPage & ";" & vbNewLine

              strScript = tmp & System.IO.File.ReadAllText("Script.txt")

              ' call the method to execute JavaScript

              fields.ExecuteThisJavascript(strScript)             

      Next

       

      [Script.txt] process add link to target page.

      After call process of Page=0, it display message confirm save. i not call command close document.

      I repaired a document that was not properly saved before Adobe Acrobat shut down. To open the restored document, click "Yes". If you click "No", changes will be lost.

      Why?