How to open adobe 11 pdf using page arguments?


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)

Please help me on this.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

David Johnson, CD, MVPOwnerCommented:
   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)
    End Sub

Open in new window

Works for me
i tried

"C:\Program Files (x86)\Adobe\Reader 11.0\Reader\acrord32.exe" /A page=2 c:\temp\xxx.pdf

from Run dialog (WIN+R) what worked.

you may try with

"AcroRd32.exe /A "page=2" "<full_path_to_your_pdf_file>"

and if it failed, it probably is because the acrord32.exe no longer is in a default path (see PATH environment variable). you could help by searching for acrord32.exe at your windows drive and add the full path (same as done by David).


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
JOLEEJJAuthor Commented:
Excellent help.  Thanks
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.NET

From novice to tech pro — start learning today.