Microsoft KB Archive/214157

= WD2000: Cannot Replace All Occurrences of Invalid MERGEFIELD Field =

Article ID: 214157

Article Last Modified on 12/6/2000

-

APPLIES TO


 * Microsoft Word 2000 Standard Edition

-



This article was previously published under Q214157





SYMPTOMS
When you click the Check For Errors button on the Print Merge toolbar, Word may prompt you repeatedly for the same invalid MERGEFIELD field.



CAUSE
Word prompts you to correct each instance of invalid MERGEFIELD fields in your mail merge main document, but there is no way to replace or remove all occurrences of a single incorrect field. You can only replace or remove one occurrence of a field at a time.



WORKAROUND
If your main document contains multiple instances of an invalid field, you can use the Replace command on the Edit menu to replace or remove all instances of the field at once. Use one of the following methods appropriate for your situation.

Method 1: To Replace All of the Same Invalid Merge Fields
To replace all of the same invalid MERGEFIELD fields with a different MERGEFIELD, follow these steps:  In your mail merge main document that contains the invalid merge fields, press ALT+F9. This toggles the field codes in your document. Your MERGEFIELD fields should appear similar to the following example:

{MERGEFIELD Address}

 On the Edit menu, click Replace. On the Replace tab, click More. Place the insertion point in the Find what box, click Special, and then click Field. A "^d" (without the quotation marks) appears in the Find what box. After the "/d", type a space, and then type your invalid merge field. For example, if your invalid merge field was the example in step 1, type into the Find what box so that it is similar to the following line:

^d MERGEFIELD Address

 Leave the Find and Replace dialog box open, and then click in your document window to activate it (the Find and Replace dialog box is modeless and remains on the screen).</li> Select the correct MERGEFIELD field that you want to replace the invalid MERGEFIELD with, and then on the Edit menu, click Copy.

NOTE: If there is not a correct MERGEFIELD in your mail merge main document, click the Insert Merge Field button, and then select the correct MERGEFIELD. Then on the Edit menu, click Copy.</li> Click in the Find and Replace dialog box to activate it.</li> Position the insertion point in the Replace With box, click Special, and then click Clipboard Contents. A "^c" (without the quotation marks) appears in the Replace with box.</li> Click Replace All.</li></ol>

Method 2: To Remove All of the Same Invalid Merge Fields
To remove all of the same invalid MERGEFIELD fields from your mail merge main document, follow these steps: <ol> In your mail merge main document that contains the invalid merge fields, press ALT+F9. This toggles the field codes in your document. Your MERGEFIELD fields should appear similar to the following example:

{MERGEFIELD Address}

</li> On the Edit menu, click Replace.</li> On the Replace tab, click More.</li> Place the insertion point in the Find what box, click Special, and then click Field. A "^d" (without the quotation marks) appears in the Find what box.</li> After the "/d", type a space, and then type your invalid merge field. For example, if your invalid merge field was the example in step 1, type into the Find what box so that it is similar to the following line:

^d MERGEFIELD Address

</li> Position the insertion point in the Replace With box, and then delete any text contained in the box. This box should remain blank.</li> Click Replace All.</li></ol>

Additional query words: repeats repeatedly several multiple times many

Keywords: kbmerge kbprb KB214157

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.