在Word 2013中的邮件合并中添加变量超链接 [英] Add Variable Hyperlink in Mail Merge in Word 2013

查看:333
本文介绍了在Word 2013中的邮件合并中添加变量超链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将超链接添加到邮件合并字段.像这样:

I'm trying to add a hyperlink to a mail merge field. So something like this:

{HYPERLINK "{MERGEFIELD "Links" }"}

所以我创建了一个像这样的字段.

So I create a field like this.

{ MERGEFIELD Links }

以上方法有效(它为不同的收件人显示不同的链接).

And the above works (it displays different links for different recipients).

但是,当我转到编辑字段",然后尝试将HYPERLINK添加到{MERGEFIELD Links}时,Word将不允许我.这意味着当我键入HYPERLINK后跟一个空格时,变量"字段消失了.而不是显示文字...

However, when I go to Edit Field, and then attempt to add HYPERLINK to { MERGEFIELD Links}, Word will not allow me. Meaning that when I type HYPERLINK followed by a space, the "variable" field is gone. Instead of word displaying...

LINK

它显示...

   {HYPERLINK "{MERGEFIELD "Links" }"}

即使我按更新字段".因此,出于某些原因,Word不允许我输入HYPERLINK.

even after I press "update field". So Word is not letting me enter HYPERLINK for some reason.

我该如何解决?

推荐答案

来自 Microsoft网站

  1. Insert菜单上,单击Field(在更高版本的Office版本中的快速部件"下).
  2. 在字段名称"列表中,单击超链接", 然后单击确定.文字Error! Hyperlink reference not valid 出现在文档中.
  3. ALT+F9键打开{ HYPERLINK \* MERGEFORMAT }域代码.
  4. 将插入点放在HYPERLINK之后,然后添加一个空格.
  5. 在插入"菜单上,单击"Field".在Field names列表中,单击MergeField.在字段名称"文本框中,键入包含超链接的数据源字段的名称,然后单击确定".例如,如果数据源字段的名称为"Address1",则字段代码如下所示:{ HYPERLINK { MERGEFIELD "Address1" } \* MERGEFORMAT }
  6. 按ALT + F9键关闭域代码.您现在有了Error! Hyperlink reference not valid文本.
  7. 将插入点放在Error! Hyperlink reference not valid文本中间的任意位置,然后插入要显示的文本.如果您想要合并字段,请从菜单上的插入合并字段"选项中插入.
  8. 在要保留的文本之前和之后删除Error! ...的其余文本.
  1. On the Insert menu, click Field (under Quick Parts in later office versions).
  2. In the Field names list, click Hyperlink, and then click OK. The text Error! Hyperlink reference not valid appears in the document.
  3. Press ALT+F9 to open the { HYPERLINK \* MERGEFORMAT } field code.
  4. Put the insertion point after HYPERLINK and then add a space.
  5. On the Insert menu, click Field. In the Field names list, click MergeField. In the Field name text box, type the name of the data source field that contains the hyperlink, and then click OK. For example, if the name of the data source field is "Address1," the field code appears as follows: { HYPERLINK { MERGEFIELD "Address1" } \* MERGEFORMAT }
  6. Press ALT+F9 to close the field code. You now have Error! Hyperlink reference not valid text.
  7. Put the insertion point at some arbitrary place in the middle of the Error! Hyperlink reference not valid text, and insert the text you want to appear. If you would like a merge field, insert that from the "Insert Merge Field" option on the menu.
  8. Delete the remaining text of Error! ... before and after the text you want to keep.

注意:如果您的合并字段仅包含一个标识符,并且URL作为合并文档的静态部分提供,则此方法也可以使用.在第5步中,您将需要插入URL文本以及MergeField,例如: { HYPERLINK "https://www.myurl.com/EditForm.aspx?ID={ MERGEFIELD ID }" \* MERGEFORMAT }

Note: If your merge field only contains an identifier, with the URL to be provided as a static part of the merge document, this can work also. On Step 5, you will need to insert the URL text as well as the MergeField, for example: { HYPERLINK "https://www.myurl.com/EditForm.aspx?ID={ MERGEFIELD ID }" \* MERGEFORMAT }

这篇关于在Word 2013中的邮件合并中添加变量超链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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