在 INCLUDEPICTURE 字段中使用 REF?
我的任务是使用用户在某些表单字段中已填写的值来为某些文档(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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
完全按照您的方式为我工作...
您确定 { REF } 子字段是正确的字段吗?子字段可能看起来像普通的卷发,但事实并非如此。如果您手动输入 {} 或从某处剪切/粘贴,请删除 {REF...} 并使用 Ctrl-F9 插入新的子字段标记,然后在花括号内输入“ REF NumCaso ”。注意空格。
{ 和 REF 之间需要有一个空格,NumCaso 和 } 之间也需要有一个空格。我不知道您是否只是在此处发帖时忘记复制它们,但您确实需要它们。
Works for me exactly the way you have it...
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.
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.