Link to home
Start Free TrialLog in
Avatar of tols12
tols12

asked on

When I print an MS Access Report to PDF, my hyperlinks changes and doesn't work

When i create a report in MS Access 2007, i have a hyperlink to a particular file on my hard drive. That works great. However, the problem occurs when I save the report to .pdf, the hyperlink clicks properly but it replaces any spaces in the path or file name with a %20. Then it wants to allow it to follow the path but the path is incorrect. How do we work around this issue so the file/path name doesn't create a %20 on every space? Thanks!
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Use folders and file without spaces.  This is a known problem and removing the spaces from the folder and file names is the only sure solution.  On the internet with 'http://www.mysite.com/', spaces in file names should be replaced with %20 according to the 'rules'.  So Adobe is creating 'http' links according to the rules but your files are not on the internet but local to your computer so things get confused.
Something more is going on that is wrong though.
Save the shim I posted to the desktop.
It has a link to the filesystem with a space in it.
Double-click the file.
Hover the mouse over the link.
You will see the %20
Yet, in IE, the link works
<How do we work around this issue so the file/path name doesn't create a %20 on every space? >
We don't.
As noted, that is correct syntax, and works in IE
<Then it wants to allow it to follow the path but the path is incorrect>

The question is "Why is the path not working in the PDF version?"

Post a PDF
test1.htm
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok, that one didn't
What about this one?
test
IE Grabs it, thows http:// in front and then it doesn't work
http://file///C:/Program%20Files.
Is that happening with the PDF.  Then it's a zone thing.
I was using IE8 on XP so it may be different.  But I think the problem may be that Adobe is making 'http' links and not 'file' links.  But until @tols12 tells us, we won't know.
Access 2007.
Can and should be the MS plug-in and no Adobe on the render side.
But agreed, speculating without evidence would be...fun...not productive ;)
My question would be why there is a need to navigate to a file from a PDF?
(Why not just create a shortcut to the file?)

Is there something specific about this file that it needs to be accessed via a PDF, created from a report with hyperlinks?

Jeff
I haven't played much with hyperlinks.  On paper, they are just formatting.  Most things in print preview aren't highlightable/selectable/clickable.  Are hyperlinks different?  Or are we dealing with a form?  More speculation :)
"hyperlinks" in both Excel and Adobe PDF are active links to web pages... except that the question above is about links to files and that's where the formatting question or problem comes in.  Your examples are fine except that the links in question are not in web pages, they are just links in Excel and Adobe PDF.  That makes the 'rules' different.
You can store hyperlinks in an Access table.  They are clickable.  Links on a form are clickable too.  What @boag2000's post made me wonder is what links on a Report Print Preview are like.  Most report preview elements are NOT interactive.  For example, a command button on a report print preview is not an active control. Is a hyperlink?
Huh?  I see no mention of 'Report Print Preview' except in your post.  I should have said "hyperlinks" in both Access and Adobe PDF are active links to web pages.  The question is about printing from Access to PDF and having spaces in the links converted to '%20'.

I wish @tols12 would respond to his question here.
<Grin>The question title is clearly 'Report' and the question text is 'when I create a report...'. That can't be design view, and can't be paper.  That leaves print preview or one of the new modes of A2007+
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tols12
tols12

ASKER

I am trying a few of your options. I will reply in a day or so...
Avatar of tols12

ASKER

Ok, i think as mentioned it is because i have spaces in the names of my documents. I have over 7,000 documents and the majority have spaces. Is there a way to take out the spaces of these documents all at the same time so i don't have to delete the spaces one by one?
I doubt that spaces in names are the source of your grief.
A hyperlink gets spaces replaced by '%20' and functions just fine.

Do ANY of your hyperlinks work?
If you take the spaces out of one, does it then work, where before it did not?

The three experts who have replied to your question have speculated about your issue and asked for more information.
Please go through the posts and reply to our inquiries, and remove some of the uncertainty about what you are doing.
I'm sure there is a way, but that would need to be a separate question.

I'm still curious about the need for this functionality...
I am struggling to print an access report to PDF with a button that hyperlinks to a website but the button shows text "Video" instead of the URL of the website