Please Note: This article is written for users of the following Microsoft Word versions: 2007 and 2010. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Maintaining Fields in a Merged Document.

Maintaining Fields in a Merged Document

Written by Allen Wyatt (last updated January 24, 2022)
This tip applies to Word 2007 and 2010


3

Jacqueline asked if it is possible to maintain cross-reference fields in a merged Word document. It seems that when the merge is done, the cross-references are converted to plain text.

Word is actually designed to behave this way, and for good reason. Consider your source document for just a moment. If you have a cross-reference to a paragraph, that is fine. Now, suppose you merge this source document with ten data records. Now, instead of one referenced paragraph you have ten copies of the same paragraph—all in the same document. To which of the ten paragraphs should the cross-reference exist? Now imagine the cross-reference confusion if you merge with fifty or a hundred data records. Since Word has no way of knowing how the cross-reference should be maintained, it converts the cross-reference to plain text.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (11491) applies to Microsoft Word 2007 and 2010. You can find a version of this tip for the older menu interface of Word here: Maintaining Fields in a Merged Document.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Repeating Column Information on Each Page

When your table occupies lots of pages, you may want to have information in a particular column repeated on each page. ...

Discover More

Buttons Don't Stay Put

Excel allows you to easily add all sorts of objects and controls to your workbook. Sometimes, though, those items might ...

Discover More

Changing the User Name in Existing Comments

Want to change the name that Word associates with various comments previously added to your document? Here are some ideas ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More WordTips (ribbon)

Calculating Page Count for a Range of Sections

When adding page numbers to a header or footer, you may find it helpful to modify how Word determines its "Page X of Y" ...

Discover More

Extracting INCLUDEPICTURE File Names

If you use the INCLUDEPICTURE field to add images to your document, you may love the macro in this tip. It allows you to ...

Discover More

Inserting a Cross-Reference to the Last Style on a Page

It is often helpful to reference a specific heading in the header or footer of a page and have that reference change on ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 2 + 8?

2019-07-05 02:55:42

Marek Margetín

Hi Allen,
we understand the reason why Word works, but that doesn't mean that Jacqueline's problem, which I had too, should be unsuccessfully closed. I wonder where I'm making a mistake, but I see a simple solution that no MVP has written yet. Please correct me.

If the whole "problem" with cross-referencies in mail-merge is that a NEW merged document loses bookmarks / cross-reference links from the original document, then .. => simply edit only OLD document. With this idea I started to look for and in a few minutes I found that Field.Unlink is quite useful to replace MailMerge.Execute. The best part is that we can select which field should be unlinked/processed (mergefield) and which should be not (cross-referencies). Just need to prepare for correct output with turning on .ViewMailMergeFieldCodes (Preview Results).

Please do you see any serious mistake in that?

I'm a lawyer, not a programmer, so I don't dare to post here my lay VBA code, but it works like charm for me. If you agree, please type a short profi code for Jacqueline and other users. Thank you.


2013-10-21 19:57:21

jay

yes, so there is no tip?


2012-06-25 09:18:03

Dag Ole

So, the tip is; "You can't"? I wonder because I would like the NUMPAGES field to be evaluated in the merged document and not in the template and don't find a way to accomplish this.


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.