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

Get Acrobat version from VB

New Here ,
Feb 27, 2023 Feb 27, 2023

Copy link to clipboard

Copied

I am trying to find a property of this object to return the Acrobat version, e.g. "Adobe Acrobat Pro".

oPDDoc = ole.Create("AcroExch.PDDoc")

But no luck so far.  This is what I need.

Bill2801679328v4_0-1677531590333.png

 

TOPICS
How to , JavaScript

Views

1.5K

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

Copy link to clipboard

Copied

JavaScript can provide the answer.

app.viewerType will return "Reader" (for Reader), "Exchange" for Acrobat Standard (or very early versions of Acrobat) and "Exchange-Pro" for Acrobat Pro.

app.viewerVersion will return the exact version number.

I don't believe there's a way to identify if it's 64- or 32-bit, though.

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

Copy link to clipboard

Copied

Here's some reference docs that show how to use the JS object in VBA. 

It's about halfway down the page, search for "JSObject" 

https://opensource.adobe.com/dc-acrobat-sdk-docs/library/interapp/IAC_DevApp_OLE_Support.html

 

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
New Here ,
Feb 28, 2023 Feb 28, 2023

Copy link to clipboard

Copied

Yes, I have used that guide and also https://opensource.adobe.com/dc-acrobat-sdk-docs/library/jsapiref/JS_API_AcroJS.html but without success.  It seems that even viewerType is not exposed to the OLE object.  So at this point I am making the user pick which version of Acrobat they are using from a dialog.  All of this is a workaround.  I can create form fields through OLE.  I can also create a user Submit button through OLE.  But what I would like is to use the Distribute functionality.  I have not been able to do that through OLE.  Instead I send keystrokes to the UI. (That is the reason I need to know the version - to give focus to the right window.)  That is an incredible kludge, but at this point we are just trying to get something working.  Thanks.

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

Copy link to clipboard

Copied

You know that by sending keystrokes to Acrobat you are getting around the office automation interface and breaking your license agreement. 

 

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
New Here ,
Feb 28, 2023 Feb 28, 2023

Copy link to clipboard

Copied

LATEST

Had no idea.  But I don't understand.  If I am compliant when I work through the UI, and if I am compliant if I use automation, why can't I combine both?  I would certainly prefer to do it all through automation if I could figure out the distribution part.

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