These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Trying to open Secured PDF from VB

jryan32
Registered: Mar 4 2008
Posts: 2

Can anyone explain this PDF & Visual Basic issue to me...?

I've got a PDF manual that I received from a vendor that's password
protected against changes, but can be viewed and printed.

If I do a Start | Run | g:\test\manual.pdf, the file opens in the Windows
associated program (Acrobat Reader) with the titlebar showing "Manual.pdf (SECURED)".

When in Visual Basic, if I issue a ShellExecute command that basically does the same thing, but I get a "File Not Found" error returned and Acrobat never opens.

I know the VB code is correct because on non-password protected pdfs, both ways work identical. I don't understand why it'll open using Windows just fine but when called from VB it errors.

Any help would be greatly appreciated. Thanks...JR

My Product Information:
Reader 8.1.2, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
I agree that ShellExecute should work the same way. I don't know what's going on there, maybe it's the OS, are you on Vista? It could also be the parameters and the Verb you are using. There are a couple of different ways this function can be used, you might also want to look at the Acrobat Command line reference. There may be something in there that could help.

However, I have a different idea for you to try. Take a look at the Acrobat IAC interface. This is an ActiveX interface to Acrobat that gives you much more control over loading and operating on documents. You can find the IAC reference and guide at:

http://www.adobe.com/devnet/acrobat/

Look for "Interapplicaion Communication"

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script