Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hyperlink to local PDF file page

We have a situation where we deliver an Excel file along with several PDFs on
our product delivery DVD. The Excel file is an installation guide and one
column of various rows needs to have a hyperlink to a specific page in one of
the PDF files for more details on that item. The PDF files are generated
from Word documents. Since the page numbers and sections of the documents
will change, keeping the Excel document up to date was an issue. I wrote a
Macro function that goes through the speadsheet and looks in two specified
columns for a Word file name and a table of contents text string. The macro
finds all of the files used, opens each file and reads the TOC entries to
find the matching text and page number. From that information, a hyperlink
is created to jump to that page in the PDF.

Now, to open a PDF to a specific page, you put xxx.pdf#page=3 for example.
Unfortunately, Excel doesn't seem to like this functionality and converts the
# to a -. The hyperlink will open the pdf file but not to the page we need.
I wrote an html file to go in the same directory that would take the filename
and page number as parameters and that page would assemble the correct URL
and redirect to it. Unfortunately, Excel doesn't seem to like the parameters
(or the ? and & or their encoded equivalents). I've tried using the
xxx.htm?file=y.pdf&page=3 as the hyperlink address or using xxx.htm as the
address and file=y.pdf&page=3 as the subaddress but neither seems to work. I
also tried using just the pdf file as the address and the page=3 as the
subaddress but it didn't care for that either. I've tried using the pdf or
htm file without any path (they are in the same directory), and have also
prepended the openworkbook's path to both the pdf and htm file (with and
without file:// in front) and still no joy.

There have also been cases among all of these tests that called the local
htm file with the correct arguments but it would then not redirect to the
correct url.

Does anyone have any guidance for me on whether this can be done at all or
how to accomplish this? Is there any way to make this work?

Thank you very much.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlink to specific page in a PDF file Tahani Excel Discussion (Misc queries) 1 April 8th 08 06:39 AM
How do I hyperlink a cell in an .xls file to a .pdf page DaveH Excel Discussion (Misc queries) 2 September 11th 07 06:28 PM
Can a chart reference the local page Mike H Charts and Charting in Excel 3 May 30th 06 12:58 AM
VBA to save a web page to local disk Ron Excel Discussion (Misc queries) 0 April 26th 06 05:18 PM


All times are GMT +1. The time now is 02:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"