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

Hi,

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?
tselectroAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
karthika_ctsConnect With a Mentor Commented:
ssCore.init();
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) {
ssDebug.trace(AdobePath.result);
} else {
ssDebug.trace('error('+AdobePath.Error.code+') '+AdobePath.Error.description);
}
ssCore.Shell.execute({path:AdobePath.result, arguments:PDFLocation});
}

Reference:
http://www.northcode.com/forums/archive/index.php?t-5934.html

DELPHI code is given in this thread:
http://www.experts-exchange.com/Software/Misc/Q_22997066.html
0
 
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.
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
All Courses

From novice to tech pro — start learning today.