Microsoft KB Archive/63201

Word: Using the SET and ASK Instructions in a Print Merge

PSS ID Number: Q63201 Article last modified on 03-07-1997

=
========================================================= 3.01 3.02 4.00 5.00 5.10 MACINTOSH kbprint

= SUMMARY =

The SET and ASK instructions in Microsoft Word allow for the manual input of data into specific fields while a print merge is being executed. These instructions used with a question mark generate a dialog box asking for data input that will be inserted into the document where the defined field names occur. The field name used with each instruction must be a field name that is not used in the data document and must appear on the main document. The syntax resembles the following:

<> or <>

The following is an example of a print merge document, where “edgar” is the field name and “President” is the input:

Example Result ——- ——

< > < > John Doe < 111 Main street < > Maytown <> < > President = MORE INFORMATION =

The SET instruction in the example above will generate a dialog box with the message “Enter Data.” The information is entered at the beginning of the print merge, and will be printed on all of the form letters or mailing labels. Up to 256 characters can be entered in this dialog box.

Another way to use the SET instruction is with a message in the prompt. The SET instruction will resemble the following:

<> < >

This will generate a dialog box with the message “Please Enter a name.” The data or name entered will be printed on each of the form letters or mailing labels. The message itself can be up to 100 characters.

The ASK instruction works much the same way the SET? instruction does. However, the ASK dialog box prompts you for data for each individual form letter or mailing label. Separate data can be entered for each letter. If you have a different message for different people or companies, this command can be used.

For more information about SET and ASK, see pages 80-83 in the “Reference to Microsoft Word” version 4.0 manual. You can also query in on the following words:

ASK and SET and Print Merge KBCategory: kbprint KBSubCategory: kbfield kbmerge Additional reference words: macword macword5 ====================================================================== ============================================================================= Copyright Microsoft Corporation 1997.