WD2000: Merged Hyperlinks from Access Contain Extra Information (283172)



The information in this article applies to:

  • Microsoft Word 2000

This article was previously published under Q283172

SYMPTOMS

When you perform a mail merge in Microsoft Word, using a Microsoft Access database with hyperlinked data in it, the resulting merged data has two parts: the linked reference and the text reference.

For example, the address "somebody@microsoft.com" appears in the merged document as follows:

somebody@microsoft.com#http://somebody@microsoft.com#

CAUSE

This behavior occurs because the subaddress information of the hyperlinked field is converted and displayed along with the address itself.

RESOLUTION

The following method filters out only the address portion of the hyperlinked field:
  1. Start Access and open the database that contains the mail merge information.
  2. Click Queries, and then click Create a query in Design view.
  3. Select the table with the mail merge information, click Add, and then click Close.
  4. Add the following syntax to the Field line in the query design grid:

    newEmailField: Left([oldEmailField],InStr([oldEmailField],"#")-1)

    NOTE: Substitute the name of your hyperlink field for "oldEmailField."
  5. Save the query and quit Access.
  6. Base your mail merge document on the preceding query, and use "newEmailField" as the merge field.

MORE INFORMATION

In Access, a hyperlink address can have up to four parts that are separated by the number sign (#):

displaytext#address#subaddress#screentip



Term Explanation
Displaytext a descriptive term used to describe the address.
Address a URL or UNC address to the document.
Subaddress a specific location on a page.
Screentip the text that appears when you rest the pointer over a hyperlink


When you type only the e-mail address, for example, somebody@microsoft.com, Access stores it as both the address and subaddress portion of the hyperlink field in the following format:

somebody@microsoft.com#http://somebody@microsoft.com#

When you subsequently use this field in a mail merge operation, the entire string is converted to text.

Modification Type:MajorLast Reviewed:10/28/2002
Keywords:kbprb KB283172