View Single Post
  #1   Report Post  
yogeshspsoft yogeshspsoft is offline
Junior Member
 
Posts: 0
Arrow How to hyperlink to a specific page of an PDF file from MS Word 2007 using VBA/VB 6.0

Hello All:

From MS word 2007, want to Hyperlink to the specific page of an PDF file but it always opens the first page of the PDF file

Using:
StrLocationFileNm = TxtPDFFile.Text & "#page=5"
ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:=StrLocationFileNm, SubAddress:="", ScreenTip:="", _
TextToDisplay:="Read More..."

Attached it the code that is not working. If someone can help me with making it work

Code Working Prerequisite: VB 6.0
Open word document. Place your cursor where you want the hyperlink text "Read More..." to appear.
Execute the application, Select "Hyperlink" menu, Select the PDF file and its page number to be hyperlinked.
Then click on "Link" button.
In the word document the link "Read More..." will appear that should open the PDF file at specific location but it open the PDF file at first

page (Page# 1) always

Thank you for your valuable time and help

Thanks,
Yogesh
Attached Files
File Type: zip Hyperlink.zip (3.4 KB, 226 views)