Link to home
Start Free TrialLog in
Avatar of Joseph Jones
Joseph JonesFlag for Australia

asked on

How to open adobe 11 pdf using page arguments?

Hi,

The following code works on Adobe 9 but not in Adobe 11.  I get

 Dim myProcess As New System.Diagnostics.Process()
                myProcess.StartInfo.FileName = "AcroRd32.exe"
                myProcess.StartInfo.Arguments = String.Format(" /A ""page=" & intPdfPageNo & "=OpenActions"" ""{0}""",                  strJoePath & "\" & strImageCode & ".PDF")
 
                'myProcess.StartInfo.Arguments = "/A " & Chr(34) & "page=" & intPdfPageNo & Chr(34) & " " & Chr(34) & strJoePath & "\" & strImageCode & ".PDF" & Chr(34)
                myProcess.Start()


Please help me on this.

Thanks
Joe
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

   Sub Main()
        Dim intPdfPageNo As Int32
        Dim strJoePath As String
        Dim strImageCode As String
        intPdfPageNo = 2
        strJoePath = "E:\Documents"
        strImageCode = "WMI-Filters"
'        Dim strProgram As String
'        strProgram = "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\acroread32.exe"
        Dim myProcess As New System.Diagnostics.Process()
        myProcess.StartInfo.FileName = "AcroRd32.exe"
        myProcess.StartInfo.Arguments = String.Format(" /A ""page=" & intPdfPageNo & "=OpenActions"" ""{0}""", strJoePath & "\" & strImageCode & ".PDF")

        'myProcess.StartInfo.Arguments = "/A " & Chr(34) & "page=" & intPdfPageNo & Chr(34) & " " & Chr(34) & strJoePath & "\" & strImageCode & ".PDF" & Chr(34)
        myProcess.Start()
    End Sub

Open in new window

Works for me
ASKER CERTIFIED SOLUTION
Avatar of sarabande
sarabande
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Joseph Jones

ASKER

Excellent help.  Thanks