在 INCLUDEPICTURE 字段中使用 REF?

发布于 2024-10-14 09:13:46 字数 400 浏览 1 评论 0原文

我的任务是使用用户在某些表单字段中已填写的值来为某些文档(Word 2010)生成二维码。

我在文档中设置了一个收集号码的 ASK 字段。

然后,我尝试将该值“连接”到查询 Google Charts API 的 URL 中。

这是 INCLUDEPICTURE 字段的内容:INCLUDEPICTURE "http://chart.apis.google.com/chart?cht=qr&chs=120x120&chl=2011-AEX-{REF NumCaso}" \* MERGEFORMAT 问题在于

,QR 码似乎是按原样字符串生成的:“2011-AEX-{REF NumCaso}”(REF 值未替换)。

有什么方法可以通过参考该领域来实现这一点吗?

I've been tasked with generating QR Codes for some documents (Word 2010) using values already filled in by users in some form fields.

I've set up an ASK field in the document that collects a number.

I then tried to "concatenate" that value into a URL that queries the Google Charts API.

This is the content of the INCLUDEPICTURE field: INCLUDEPICTURE "http://chart.apis.google.com/chart?cht=qr&chs=120x120&chl=2011-AEX-{REF NumCaso}" \* MERGEFORMAT

The problem is that the QR Code seems to be generated with the string as-is: "2011-AEX-{REF NumCaso}" (the REF value is not replaced).

Is there any way I can accomplish that with a reference to the field?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

归属感 2024-10-21 09:13:46

完全按照您的方式为我工作...

  1. 您确定 { REF } 子字段是正确的字段吗?子字段可能看起来像普通的卷发,但事实并非如此。如果您手动输入 {} 或从某处剪切/粘贴,请删除 {REF...} 并使用 Ctrl-F9 插入新的子字段标记,然后在花括号内输入“ REF NumCaso ”。注意空格。

  2. { 和 REF 之间需要有一个空格,NumCaso 和 } 之间也需要有一个空格。我不知道您是否只是在此处发帖时忘记复制它们,但您确实需要它们。

Works for me exactly the way you have it...

  1. Are you sure that the { REF } subfield is a proper field? Subfields may look like ordinary curlies, but they're not. If you typed in the {}'s by hand or cut/pasted from somewhere, delete your {REF...} and insert a new subfield marker with Ctrl-F9, then type in the " REF NumCaso " inside the curlies. Notice the spaces.

  2. You need to have one space between the { and the REF, and also one between NumCaso and }. I can't tell if you just forgot to copy them when posting here, but you do need them.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文