Reputation: 1
Hi all you Access experts out there! :-)
I ran into an unexpected problem today. Maybe you can help me?
I create a report in Access. It has a couple of hyperlinks in it. I export the report to PDF - and the hyperlinks are preserved and clickable when the user opens the PDF. And everything works fine - I thought...
But I discovered there is a maximum "length to use" for a hyperlink. The hyperlink is created in VBA, and stored in the Hyperlink property. That's a memo field, so there is no problem setting the property to a long string. (The link is a "mailto:" to a number of people, so it can get to about 1000 characters.)
But when I click on the link in the report, the link is being truncated. If I just needed it to work in Access, I could handle this in VBA (with FollowHyperlink). But it has to work in the exported PDF too...
Any ideas? Is there any way to make Access use the whole string as hyperlink? Or another way to get the hyperlink to the PDF, other than placing it in the Hyperlink property?
Thanks in advance!
Anders Sweden
Upvotes: 0
Views: 1133
Reputation: 251
When you export a report as PDF and you have a Label with an Hyperlink in your report, the exporter generates a pdf tag with the format
<</Type/Action/S/URI/URI(https://www.....)>>
As result we can affirm that is not the Abobe PDF Reader that make a 'best guess' interpreting the link and thus the problem is an MS Access 'feature'...
Upvotes: 0
Reputation: 23067
This is an Adobe PDF problem, not an Access problem. The issue is that the PDF reader intuits what's a link and what's not, so if you're formatting your link in a way that your PDF reader can't tell it's a URL, it won't make it clickable.
I encountered this with a client's letterhead in Word, where they had their website URL in the header. They use the Word extended font spacing, and what the PDF writer generated put actual spaces between the letters (instead of changing the inter-letter spacing). The result was that the URL, which looked like a single word, e.g., http://MyWebsite.com
, was actually encoded in the PDF as http://M y W e b s i t e . c o m
. The only solution was choosing a font that looked the way the client wanted without the extended spacing.
So, I'd try a different font.
Upvotes: 1