Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am making an Excel sheet to help me to be able to easily track my ebooks and ebooks being read. so my Excel sheet contain the name of the book and the total number of pages, the current page I've reached and the % of my progress, status and the link of the ebook in the local hard drive.

What I want is that automatically when I hit the book's name(Hyper link) it will automatically to open the PDF file to the current page, for example if I am reading book X and I am on page 110, I want the link to open X.PDF on page 110, in HTML coding X.PDF#page=3 works 100%, but I want a way to hyper link and include the value inside some Excel's cell.

share|improve this question

2 Answers 2

Sounds like something for VBA. Ozgrid has dealt with this question before. Here: http://www.ozgrid.com/forum/showthread.php?t=29376 And here: http://www.ozgrid.com/forum/showthread.php?t=65950&page=1

The code they came up with is this:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    ThisWorkbook.FollowHyperlink "test.pdf#page=" & Target.Row
End Sub

The problem with this is that it will not open to a specific page. It appears that Adobe Reader will only take this syntax for specific pages when it is handled through a web browser. VBA should have functionality to send this command to the web browser.

share|improve this answer
    
aha I will check it. Thanks –  0xab3d May 7 '11 at 10:42
up vote 1 down vote accepted

I found a solution: First we use the Shell command with this syntax

Shell Acrobat_Path & " /A page=" & Current_Page & " " & SrcFile, vbNormalFocus

and Current_Page and SrcFile are the Excel's cells values

and assign this to a button with event click eg

Sub Button1_Click()
...
End Sub
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.