go to a page in a pdf file

A

Asbest

I have read some of the posts about how to open up a pdf file (shell
command). Does anyone know how to open a pdf file and go to a specified page
in the pdf file?

Thanks
 
A

Asbest

I cannot get the hyperlink to work - i've tried:
=HYPERLINK("\\server.com\file.pdf#page=2")
=HYPERLINK("\\server.com\file.pdf#nameddest=bookmarkname")
=HYPERLINK("F:\server.com\file.pdf#page=2")
=HYPERLINK("F:\server.com\file.pdf#nameddest=bookmarkname")

(Is a bookmark the same as a named destination?)

But if I type in \\server.com\file.pdf#page=2 in IE it works fine. Maybe
the IE control on an excel userform would work. Could you explain a little
more about that to get me in the right direction?

Thanks
 
A

Asbest

Correction on the last post - For the last two hyperlinks, I meant to put
(without server.com):
=HYPERLINK("F:\file.pdf#page=2")
=HYPERLINK("F:\file.pdf#nameddest=bookmarkname")

(these do not work)
 
A

Asbest

Thanks, it works great!

Is there a way to navigate to different pages without having to create a new
object every time? I tried to create an object variable that I can reuse
with another procedure but it does not work for the second procedure. Here
is my code:

Static Sub PDFPageViaIE()
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
Const strURL As String = "F:\server.com\file.pdf#page=2"
ie.navigate strURL
ie.Visible = True
End Sub

Static Sub PDFPageViaIESecondPage()
Const strURL2 As String = "F:\server.com\file.pdf#page=5"
ie.navigate strURL2
ie.Visible = True
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top