Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

OLE Automation and task manager

New Here ,
Feb 16, 2023 Feb 16, 2023

I am controlling Acrobat from VBA via OLE.  The problem is that the background task that is created in task manager is not destroyed when the script ends.  In the code below, the task is created and is destroyed.

 

oPDDoc = ole.Create("AcroExch.PDDoc")
oPDDoc.open(pdfin)
jso = oPDDoc.getjsobject()
... define some vars

jso.saveAs(pdfin)

oPDDoc.close()

End

 

However, if this line is added after ... define some vars

f = jso.addField("reply." +n, "text", vCurrentPage, aRect)

 

then the background Acrobat task is not destroyed.  Is there something I am not cleaning up correctly.? Is there another way I can get rid of this background task?

TOPICS
JavaScript , PDF forms
861
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 16, 2023 Feb 16, 2023
LATEST

Oh, and everything works correctly - field is added, etc.  It is just background task hanging on.  There have been times when that baskground task has prevented other PDFs from opening in the foreground UI until the task is ended.  But I don't have specific repeat steps for that.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines