MS Access 中的超链接太短
各位 Access 专家大家好! :-)
今天我遇到了一个意想不到的问题。也许你可以帮助我?
我在 Access 中创建了一个报告。它有几个超链接。我将报告导出为 PDF,当用户打开 PDF 时,超链接将被保留并可单击。一切正常 - 我想......
但我发现超链接有最大“使用长度”。超链接是在 VBA 中创建的,并存储在“超链接”属性中。这是一个备注字段,因此将属性设置为长字符串没有问题。 (该链接是发给多人的“mailto:”,因此可以达到大约 1000 个字符。)
但是当我单击报告中的链接时,该链接被截断。如果我只需要它在 Access 中工作,我可以在 VBA 中处理它(使用 FollowHyperlink)。但它也必须在导出的 PDF 中工作...
有什么想法吗?有没有办法让Access使用整个字符串作为超链接?或者除了将其放置在“超链接”属性中之外,还有另一种获取 PDF 超链接的方法吗?
提前致谢!
安德斯 瑞典
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是 Adobe PDF 问题,而不是 Access 问题。问题在于,PDF 阅读器凭直觉知道什么是链接、什么不是,因此,如果您以 PDF 阅读器无法识别链接格式的方式设置链接格式,则不会使其可单击。
我在 Word 中使用客户的信头时遇到了这种情况,他们的标题中包含他们的网站 URL。他们使用Word扩展字体间距,并且PDF编写器生成的内容在字母之间放置了实际空格(而不是更改字母间距)。结果是,看似单个单词的 URL(例如
http://MyWebsite.com
)实际上在 PDF 中被编码为http://M y Website 。 com
。唯一的解决方案是选择一种看起来像客户想要的字体,而不需要延长间距。所以,我会尝试不同的字体。
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 ashttp://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.
当您将报告导出为 PDF 且报告中包含带有超链接的标签时,导出器会生成格式为 pdf 的标签,
因此我们可以确认,这不是 Abobe PDF 阅读器对链接进行“最佳猜测”因此问题是 MS Access 的“功能”...
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
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'...