Copy link to clipboard
Copied
I have searched a lot on this and can't find an answer. Using CreateObject("AcroExch.PDDoc") I can currently obtain .Getfilename, .getNumPages, .Getpagemode, .Getinfo("title"), .getinfo("Creator"), .getinfo("producer") and others. However, I would like to get the file location of the document that is opened. I am trying to use .Getinfo("Location") but am not having any luck. The area in the PDF I am trying to target is seen by going to File>Properties>Description Tab. At the bottom of the description tab is an area for advanced that has "PDF Producer", "PDF Version", "Location", "File Size" and "Page Size". This is the Location I want to reference in VBA but it will not pull in the value seen in the PDF document. The reason I need to do this is because the software creating the PDF randomly assigns file names and locations within my temporary Internet Files folder and I can't consistently target the full PDF file path to finish out what I am doing in VBA. White the PDF is open i want to get the file name and location and save it somewhere else and extract information out of the document. What am I doing wrong? Should I be using another object type or am I not using .getinfo("location") correctly? Any other ideas to execute this? Thank you!
Copy link to clipboard
Copied
Although this appears in a dialog with other file info (metadata) this is not metadata. Logically, it can't be because a file does not store its own location, it is implicit. It is just the file path. You would normally have this to open the PDF in the first place, but it's also a property of the document object.