View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
jamescox[_98_] jamescox[_98_] is offline
external usenet poster
 
Posts: 1
Default go to a page in a pdf file


Assuming you are working out of Excel, this will do it:


Public Sub PDFPageViaIE(strUrl as String)

Dim ie As InternetExplorer

Set ie = New InternetExplorer

On Error Resume Next

ie.navigate strURL

Do

DoEvents

Loop Until ie.readyState = READYSTATE_COMPLETE


Set ie = Nothing

End Sub


where strURL is in the form of

F:\server.com\file.pdf#page=2

or

\\server.com\file.pdf#page=2


or even

http://www.irs.gov/pub/irs-pdf/fw4.pdf#page=2 (my test file :Bgr )

Of course, this does open it in an Internet Explorer browser window -
and it may be a new tab in an existing IE window if you have one already
open. The .Navigate method may accept parameters that force it to use a
new window - you can look for that, if you feel you need that
functionality.


--
jamescox
------------------------------------------------------------------------
jamescox's Profile: http://www.thecodecage.com/forumz/member.php?userid=449
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=109374