Open a pdf file and display a specific page in the document


I am trying to open a pdf document and automatic display the page number xx.

From the command shell, following syntax do exactly what I want:
acrord32.exe  /A "page=3" c:\pdftest.pdf

In VB/VBA I try to use the ShellExecute api function:
Call ShellExecute(Me.hwnd, "Open", "c:\pdftest.pdf", "page=3", "", SW_SHOWNORMAL)

The api function display the pdf file, but does not "jump" to page 3. Is it possible to use the ShellExecute function, or can this be done in other way?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ssDefaults.synchronousCommands = true;

function openPDFonPage(pageNum) {
PDFLocation = "/A \"page=" + pageNum + "=OpenActions\" \"" + ssGlobals.ssStartDir + "\\Example.pdf\""

var AdobePath = ssCore.Shell.getDefaultApplication({extension:"pdf"});
if (AdobePath.success) {
} else {
ssDebug.trace('error('+AdobePath.Error.code+') '+AdobePath.Error.description);
ssCore.Shell.execute({path:AdobePath.result, arguments:PDFLocation});


DELPHI code is given in this thread:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tselectroAuthor Commented:
Hi, I am using a third part application (Citect SCADA) that has embedded Visual Basic (vba) - .Net is not supported. I need a Visual Basic 6.0/vba solution.
Forced accept.

EE Admin
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.