ID: Q88679
The information in this article applies to:
In Microsoft Word for Windows, you can use the asterisk (*) and the question mark (?) wildcard characters as part of a selective print merge operation. These wildcards function in Word for Windows similar to the way they function in Microsoft MS-DOS (that is, they act as a substitute for a letter, number, or string).
The asterisk (*) wildcard character represents a whole word or a group of characters, regardless of length. For example, "D*" (without the quotation marks) represents any group of characters that begins with the letter D, regardless of the length of the string. And, "*D" represents any group of characters that ends with the letter D, regardless of its length.
Note: You cannot search for a string that both begins with an asterisk and ends with an asterisk; therefore, "*D*" is an invalid selection criteria.
The question mark (?) wildcard represents a single character. For example, "?D" represents any string that contains one character before the letter D, such as "ID." And, "?D?" represents any string with one character before and one character after the letter D, such as "IDE."
While the asterisk (*) wildcard character can successfully merge data that begins with numbers, the question mark (?) wildcard character cannot. For example, you could use "98*" during a print merge, but not "98???".
Note: In the following samples, create the field braces by pressing CTRL+F9.
{if {First_Name}="D*" "{First_Name}"}
{if {First_Name}="*D" "{First_Name}"}
{if {First_Name}="D???" "{First_Name}"}
For information on using wildcards to perform a selective print merge in which a numeric character follows the wildcard, query on the following words in the Microsoft Knowledge Base:
numeric and and wildcard and incorrect
Microsoft has confirmed this to be a problem in Word for Windows versions 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, and 6.0c. This problem was corrected in Word version 7.0 for Windows 95.
"Microsoft Word for Windows User's Guide," version 2.0, pages 637-644
"Microsoft MS-DOS User's Guide and Reference," version 5.0, pages 73-75
KBCategory: kbusage kbhowto KBSubcategory: kbfield kbmerge Additional query words: winword2 1.0 1.10 1.10a 2.0 2.0a 2.0a-CD word6 wild winword card cards pmh helper conditional
Keywords : kbfield kbmerge
Version : 1.x 2.x 6.0 6.0a 6.0c
Platform : WINDOWS
Last Reviewed: February 6, 1998