Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

How to use a hyperlink in excel to open a specific page in a .pdf document.

0

I am trying to set up a hyperlink in an excel cell to open a specific page in a .pdf document with bookmarks. I have opened the "edit hyperlink" window and have selected " Existing File or Web page" to link to: button. I have  selected the path to the .pdf document in the Address: window.

When I click on the "Bookmark..." button on the right side of the window, I get a message " Microsoft Excel could not open this file or could not parse a file of this type."

The .pdf document does have bookmarks.

How do I get past this error message?

I have also added the desired page number to the path to look like this, ..\..\AMIT%20Manuals\AMIT%20Neck%20(iPad).pdf#page=17 and added the following code in a new module in the VBA project window. 

Sub linkpdfpage()

Worksheets("Sheet1").Activate

Shell ("C:\Program Files\Internet Explorer\iexplore.exe " + ActiveCell.Value)

End Sub

All attemps result in the same thing. I can open the 1st page of the .pdf document, but I cannot get it to open at page #17, or any other page.

I am using Excel 365

Answer
Discuss

Answers

0

Hi Myodoc

This same subject was covered by my previous answer run macro by hyperlink which opens a pdf on a given page using Adobe Acrobat Reader.

Hope this works for you.

Seasons Greetings!

Discuss

Discussion

Did that work for you? 
John_Ru (rep: 6142) Dec 28, '21 at 5:54 am
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login