I wrote a small utility in Excel-VBA that also interacts with Acrobat Javascript in several separate .pdf files.
This code has been tested extensively and works exactly the same as on my desktop PC. Ultimately, however, I need to implement this code on the Microsoft Surface platform. When I try to run the same code from an Excel file on Microsoft Surface, the code intercepts any rows using "GetJSObject".
Eg. It works fine on my PC, but the error "object or method is not supported" occurs on my surface.
Set gAPP = CreateObject("AcroExch.App") Set gPDDOC = CreateObject("AcroExch.PDDoc") If gPDDoc.Open(pdfFileName) Then Set jso = gPDDOC.GetJSObject
Until now, I could find hints on the Internet that GetJSObject does not work well in a 64-bit environment, and my Surface works with 64-bit Windows 10 and 32-bit Excel.
However, I do not think that this in itself can explain the difference in behavior on both machines; my desktop works with 64-bit Windows 7 with 32-bit Excel, and everything works as intended.
Where should I look to find the source (and solution) of the problem?
EDIT / UPDATE : The getJSObject statement really works as intended if I take the extra step manually by opening a copy of one of the corresponding .pdf files in Acrobat before running my VBA code. I suppose this means that somehow the definitions of objects (for example, Set gAPP = CreateObject("AcroExch.App") ) work differently on the surface compared to my PC - not the getJSObject command, as it originally was it supposed?
Until now, it did not make much sense to me how / why this might be true (not to mention how I could solve the problem).
source share