Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hyperlink to specific page in a PDF file | Excel Discussion (Misc queries) | |||
How do I hyperlink a cell in an .xls file to a .pdf page | Excel Discussion (Misc queries) | |||
Can a chart reference the local page | Charts and Charting in Excel | |||
VBA to save a web page to local disk | Excel Discussion (Misc queries) |