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

OLE Automation issue

New Here ,
Feb 04, 2023 Feb 04, 2023

Copy link to clipboard

Copied

We are converting a process in Acrobat Pro 9 to a current Acrobat Pro subscription since the security certificate expired.  The OLE part of what we are doing still works successfully in 9, but there is an issue in the subscription version. I am running this from a language similar to VB.

 

Everything works until this line of code

jso.saveAs(pdfname)

 

Previously the file was saved.  Now, the popup below is shown

Bill2801679328v4_0-1675541263597.png

Is there a way to have this automatically allowed so the user is not involved?  This popup displays if the pdfname file exists or not.

 

These are my settings.

Bill2801679328v4_1-1675541446083.png

If I click on the popup, the process continues successfully.  I just need to get rid of the UI interaction.

 

Bill.

TOPICS
JavaScript , PDF forms

Views

463

Translate

Translate

Report

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
Community Expert ,
Feb 04, 2023 Feb 04, 2023

Copy link to clipboard

Copied

Disable everything that's selected under the "Security (Enhanced)" tab.

Votes

Translate

Translate

Report

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 04, 2023 Feb 04, 2023

Copy link to clipboard

Copied

LATEST

Bingo!  That worked.  Thanks.  Naturally there is another question.

The OLE portion that defines form fields is now working.  For the next part I open the PDF in the UI and send keystrokes to it to distribute the form.  (Although seeing what Thom does with execMenuItem looks intersting.)  At any rate, I can send keystrokes that gets me to the point below.

Bill2801679328v4_0-1675556877633.png

But I can't find a hot key to click the Distribute button.  I am going to just save a local copy.

 

I did the original code 12 years ago and have not had to touch it since, so I have forgotten everything.

 

Bill.

Votes

Translate

Translate

Report

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
Community Expert ,
Feb 04, 2023 Feb 04, 2023

Copy link to clipboard

Copied

Or run the SaveAs script from a privileged context. 

https://www.pdfscripting.com/public/How-to-Save-a-PDF-2.cfm

 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

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