Microsoft KB Archive/98895

= Err Msg in Place of REF Field Result: Bookmark Not Defined =

Article ID: 98895

Article Last Modified on 1/18/2007

-

APPLIES TO


 * Microsoft Word 1.0 Standard Edition
 * Microsoft Word 1.1 Standard Edition
 * Microsoft Word 1.1 Standard Edition
 * Microsoft Word 2.0 Standard Edition
 * Microsoft Word 2.0a
 * Microsoft Office Word 2003
 * Microsoft Word 2.0c
 * Microsoft Word 6.0 Standard Edition
 * Microsoft Word 6.0a
 * Microsoft Word 6.0c
 * Microsoft Word 95 Standard Edition
 * Microsoft Word 95a
 * Microsoft Word 97 Standard Edition

-



This article was previously published under Q98895



SUMMARY
If you type nothing in response to an ASK field prompt, Word for Windows records a null value, which may result in one of the following error message to appear as the result of the REF field that references the empty ASK field result:

Word 1.x and 2.x:

Error! Bookmark not defined.

Word 6.x, 7.x, and 97:

Error! Reference source not found.

This happens because you cannot assign a bookmark to a null value. A bookmark must represent a value, such as a selection or the insertion point (the insertion point is not the same as a null value).

Workaround 1
To prevent the above error message from appearing, insert a SET field before the ASK field, as shown in the example below. The SET field assigns the insertion point, or no selection (&quot;&quot;), to the bookmark (instead of a null value) so the error message does not occur. {SET address2 &quot;&quot;}{ASK address2 &quot;What is the second line of  the address?&quot;}{REF address2} This workaround assigns a blank value to the bookmark that Word can insert if a different value is not later assigned using the ASK field.

NOTE: The \d (default) ASK field switch has no effect on this workaround.

Workaround 2
Insert an IF field that compares the reference to the ASK field bookmark with a reference to an intentionally undefined bookmark. If the bookmarks are the same (which means that both produce the error message), Word inserts an alternate result.

NOTE: Be sure to choose a unique bookmark name as the intentionally undefined bookmark. If this bookmark name is later assigned to a value, the workaround fails.

In the following example, which illustrates this workaround, &quot;xxxx&quot; is an undefined bookmark name. If the value of the mybkmark bookmark is null, Word inserts &quot;No name given&quot; as the result of the IF field. {ASK mybkmark &quot;Type your name:&quot;} Insert the following IF field in place of the REF field that references the ASK bookmark results: {IF {mybkmark} = {xxxx} &quot;No name given&quot; {mybkmark}} Reference(s):

&quot;User's Guide,&quot; version 2.0, pages 477-478, 640-644, 646-650

Additional query words: 1.10a 2.0 winword 7.0 word95 word7 word6 6.0 errmsg err msg print merge winword2 word97

Keywords: kbmerge kbfield KB98895

-

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

© Microsoft Corporation. All rights reserved.