Open PDF using ComObject
Posted: 19 Feb 2024, 13:27
Hello!
I still have a very limited understanding of how to use COM with Adobe, but I've gotten some things to work in the past. I'm trying to do a seemingly easy action of just opening a specific PDF, but I can't seem to get it to work. I assume the code will be something like this:
What am I missing or doing wrong? The ultimate goal is to have this Test document added/merged to a currently-open PDF (basically adding a cover page). Looking through the forums I've seen a script which should help with the merging, but my understanding is that all documents to be merged will need to be open first. Thanks in advance for the help!
I still have a very limited understanding of how to use COM with Adobe, but I've gotten some things to work in the past. I'm trying to do a seemingly easy action of just opening a specific PDF, but I can't seem to get it to work. I assume the code will be something like this:
Code: Select all
:*:yyyy::
{
OpenFile := A_Desktop '\Test.pdf'
AcroAPP := ComObject('AcroExch.App')
acrobatAVDoc := ComObject('AcroExch.AVDoc')
AcrobatAVDoc.Open(OpenFile)
}