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.
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.
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
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.
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.
Copy link to clipboard
Copied
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.