+ Reply to Thread
Results 1 to 11 of 11

Hyperlink to a specific page of an pdf on same comuter

  1. #1
    Registered User
    Join Date
    01-26-2015
    Location
    Berlin
    MS-Off Ver
    Office 2010
    Posts
    44

    Hyperlink to a specific page of an pdf on same comuter

    Hi,

    please help me with this problem of mine:

    I have an excel-file with a lot of page-numbers of pdf's. I want to open the pdf on specific pages.

    Problem is: Adobe Acrobat is not able to open a pdf and then go to a specific page, if the pdf is not "on the Internet", but on the same computer, i.e. this does not work: "#page=[page number]" (see: https://helpx.adobe.com/acrobat/kb/l...e-acrobat.html).

    First possible solution may be modifying the hyper-link in a way that Acrobat it "thinks" the pdf is "on the Internet", but is in fact on the same computer. Is this possible?

    Second possible solution may be using VBA: There are a lot of macros out there trying to solve this problem. For example this one:

    Please Login or Register  to view this content.
    (source: Michael (Micky) Avidan at: http://excel.tips.net/T003350_Linkin..._PDF_File.html)

    In my excel-file (see below: "pdftest.xlsm" or without macro inserted: "pdftext.xlm") there is a column (column L), that lists the pdf-files. For example L2 is "Test_31", which refers to the file "C:\Testfiles\Test_31.pdf". In row 2 are the page-numbers for the file "Test_31.pdf". The numbers can have these formats:
    a) content of cell M2 is "6". That means Acrobat should open "Test_31.pdf" and go to page "6"
    b) content of cell N2 is "15f". That means Acrobat should open "Test_31.pdf" and go to page "15"
    c) content of cell O2 is "45ff". That means Acrobat should open "Test_31.pdf" and go to page "45"
    d) content of cell P2 is "120-432". That means Acrobat should open "Test_31.pdf" and go to page "120"

    Is the following solution possible?: Modify the macro above in a way, that is uses variables, so this happens: When user clicks cell O2, then send this hyper-link "C:\Testfiles\Test_31.pdf" and this page-number "45" to the macro above, so that it should look like this:
    Please Login or Register  to view this content.
    and then run the modified macro.

    Of course any other solution would be great as well.

    Thank you very much in advance!
    Attached Files Attached Files
    Last edited by roderh; 06-09-2016 at 11:34 PM.

  2. #2
    Registered User
    Join Date
    01-26-2015
    Location
    Berlin
    MS-Off Ver
    Office 2010
    Posts
    44

    Re: Hyperlink to a specific page of an pdf on same comuter

    Does anybody have an idea? I would think, this is a quite common problem...

  3. #3
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Hyperlink to a specific page of an pdf on same comuter

    This works for me

    Note I had to change the path to the acrobat reader too. the red sections will get you started in regard to making the name and the page number variable but you'll need to give me a bit more guidance on how you want the macro to run. Do you want it to open all those pages you've listed in different windows?

    Please Login or Register  to view this content.
    Happy with my advice? Click on the * reputation button below

  4. #4
    Registered User
    Join Date
    01-26-2015
    Location
    Berlin
    MS-Off Ver
    Office 2010
    Posts
    44

    Re: Hyperlink to a specific page of an pdf on same comuter

    Thank you very much for answering!
    It is maybe best, to just tell the problem in short (without my theories about how VBA could work).
    pdftest.jpg
    1) "Test_31" etc are filenames of pdf ("Test_31.pdf" etc.)
    2) The numbers in range M2:R4 are page-numbers (or ranges of pages) of the corresponding pdf.
    3) Goal is: By clicking a cell in range M2:R4 the corresponding pdf will be opened by Acrobat on the specific page
    4) E.g.:
    a) Clicking M2 opens Test_31.pdf on page 6
    b) Clicking R2 opens Test_31.pdf on page 1498
    c) Clicking O3 opens Test_71.pdf on page 123
    etc.
    5) A new click should replace the old pdf-page with the new pdf-page, so that only one pdf at a specific page is open at a given time.
    Last edited by roderh; 06-10-2016 at 08:39 AM.

  5. #5
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Hyperlink to a specific page of an pdf on same comuter

    OK I understand.

    Try this. if you click in the page number area it will open adobe to the file in column L and the relevant page number. It works for most the examples I tried. Only issue I found was if the pdf file has spaces in it I had trouble finding it but if it doesn't have spaces it seems to work ok. Not sure why this is!

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    01-26-2015
    Location
    Berlin
    MS-Off Ver
    Office 2010
    Posts
    44

    Re: Hyperlink to a specific page of an pdf on same comuter

    Amazing! It just works! Thank you very much for your time to help me!
    (Btw: It seems, there should be no spaces in folder's path, also)

  7. #7
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Hyperlink to a specific page of an pdf on same comuter

    Great. Glad it worked. I learnt a few things too!

  8. #8
    Registered User
    Join Date
    01-26-2015
    Location
    Berlin
    MS-Off Ver
    Office 2010
    Posts
    44

    Re: Hyperlink to a specific page of an pdf on same comuter

    One last question, if I may: what's to change, if I would like to open the pages in different windows?
    TIA and greetings!

  9. #9
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Hyperlink to a specific page of an pdf on same comuter

    I thought it did open in different windows. Mine launches adobe then opens it in an adobe window.

  10. #10
    Registered User
    Join Date
    01-26-2015
    Location
    Berlin
    MS-Off Ver
    Office 2010
    Posts
    44

    Re: Hyperlink to a specific page of an pdf on same comuter

    Quote Originally Posted by Crooza View Post
    I thought it did open in different windows. Mine launches adobe then opens it in an adobe window.
    Yes, you are right.

    Contrary to what I mentions above:
    5) A new click should replace the old pdf-page with the new pdf-page, so that only one pdf at a specific page is open at a given time.
    I just wanted to know, what's to change, if I would want to open multiple adobe windows with different pages, so that each click opens another adobe window. That might come in handy.

  11. #11
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Hyperlink to a specific page of an pdf on same comuter

    Oh ok. Not sure but I'll look and see what I can do.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Hyperlink Specific Page
    By ExcelDummy77 in forum Excel General
    Replies: 0
    Last Post: 07-21-2015, 03:23 PM
  2. Replies: 0
    Last Post: 05-06-2013, 10:43 AM
  3. Replies: 3
    Last Post: 01-31-2013, 03:48 AM
  4. Replies: 4
    Last Post: 01-25-2013, 08:40 AM
  5. Hyperlink to specific page in PDF
    By Xx7 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-12-2011, 03:14 PM
  6. Hyperlink - PDF(specific page)
    By Vinodsralian in forum Excel General
    Replies: 10
    Last Post: 08-16-2010, 02:40 PM
  7. External hyperlink to a specific page in a workbook
    By Nimbus55 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-31-2006, 08:13 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1