保存/重新加载文档后邮件合并动态超链接字段丢失 - Word 2010 [英] Mailmerge dynamic hyperlink fields lost after save/reload of document - Word 2010

查看:17
本文介绍了保存/重新加载文档后邮件合并动态超链接字段丢失 - Word 2010的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,当我创建文档时,在域代码中使用动态超链接工作正常,但是当保存并稍后重新加载它时,链接被替换为原始记录集中的文本.我使用的域代码是:

I have a problem where using dynamic hyperlinks in field codes works fine when I create a document, but when save and later reload it the links are replaced with text from the original recordset. The field code I am using is:

{ HYPERLINK { MERGEFIELD "Fieldname" } * MERGEFORMAT }

保存然后重新加载文档后,这将类似于:

After saving then reloading the document this becomes similar to:

{ HYPERLINK "http://www.example.com" }

我正在合并到 HTML 电子邮件.

I am merging to HTML email.

保存后我一直无法让它成功工作.这是我正在尝试做的事情的简化版本,也是我无法正常工作的唯一部分.我需要准备好邮件合并文档供其他人运行,而不是每次需要运行时都在那里进行设置.

I have been unable to get this to successfully work after saving. This is a simplified version of what I'm trying to do and the only part I can't get to work properly. I need to get the mail merge document prepared for someone else to run, rather than be there to set it up each time it needs to be run.

对此的任何帮助将不胜感激.

Any help on this would be much appreciated.

推荐答案

除了插入 { MERGEFIELD Fieldname } 字段之外,还可以通过 Insert->Bookmark 插入一个唯一命名的书签,例如,紧接在合并字段字段之后.

In addition to inserting the { MERGEFIELD Fieldname } field, insert a uniquely named bookmark via Insert->Bookmark, say, immediately after the mergefield field.

我不能保证这在所有情况下都有效",但到目前为止它似乎可以解决问题.如果您不想记住任何不同的书签名称,另一种可能性是插入这样的嵌套字段:

I cannot guarantee that that will "work" in all circumstances, but so far it seems to do the trick. Another possibility if you do not want to have to remember any distinct bookmark names would be to insert a nested field like this instead:

{ SET "mfkeeper{ SEQ mfk }" " " }

{ SET "mfkeeper{ SEQ mfk }" " " }

如果您这样做,并在执行任何其他操作(例如更新 HYPERLINK 字段)之前更新嵌套的 SET 字段,您将获得一个唯一命名的书签(mfkeeper1 等).这是否可持续,我目前无法确定.

If you do that, and update the nested SET field before doing anything else (such as updating the HYPERLINK field), you get a uniquely named bookmark (mfkeeper1, etc.). Whether that is sustainable, I cannot currently tell.

此行为以某种方式解释了为什么嵌套的 HYPERLINK 行为看起来如此随意 - 如果您选择 HYPERLINK 字段并通过 F9 更新它们,Word 会将其 _GoBack 书签插入到 HYPERLINK 字段中,这似乎是阻止 Word解析嵌套的 MERGEFIELD 字段.

This behaviour gpes some way to explaining why the nested HYPERLINK behaviour seems so arbitrary - if you select the HYPERLINK fields and update them all via F9, Word inserts its _GoBack bookmark into the HYPERLINK field, and that's what seems to prevent Word from resolving the nested MERGEFIELD field.

这篇关于保存/重新加载文档后邮件合并动态超链接字段丢失 - Word 2010的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆