Use the mail merge If code to test the data being merged, and insert appropriate wording into the document. For example, you may want to print specific paragraphs based on the patient’s age, or include a second address line on envelopes only when appropriate.
Create or edit a mail merge document.
Position your cursor at the point where you want the conditional text to appear.
Initiate IF Code - Select Mail Merge in the Category box, and choose the IF field name option. Click Ok to insert an empty merge code command into your document. If you do not see the merge code, or if you see an error, press Alt+F9 to toggle the merge code display.
Remove code - Remove the text \*MERGEFORMAT from the code. Example: {IF}
Insert variable - Position your cursor at the space after the IF, but inside the braces, and insert the variable you want to test. (See "Mail Merge Tool: Variables" for details.)
Insert operator - Add a mathematical operator after the variable. Be sure to have a space both before and after the operator.
Insert value to compare - Add the value or variable to which you want to compare the first variable. Values you type (such as a number or specific text) should be enclosed in quotation marks. Values you insert as variables should not include quotation marks. Again, be sure to include leading and following spaces between each portion of the code.
Add text - Enter the text and variables to print if the condition is met, enclosed in quotation marks, leaving a space at the end.
Add alternate text - Enter the text and variables to print if the condition is not met, enclosed in quotation marks. If you do not want anything printed when the condition is false, skip this step.
Proofread - Be sure to look over your conditional statements carefully to check for spelling errors, and to be sure all the quotes and braces are correctly placed, and come in pairs.
Save & Exit - Click the X in the upper right corner of the Word document window. As you exit, you have the opportunity to save the document.
Toggle Merge Code Display - When creating and editing documents with mail merge codes (such as variables and conditional statements), it is helpful and sometimes necessary to be able to see the codes. During regular daily use, however, you may wish to have them off. While different versions of Word have different ways of accessing this setting, an easy way to toggle the merge code display, regardless of your version of Word, is to press ALT+F9 on your keyboard.
Quote in your text - If you want quotation marks within the text you want printed, you cannot simply type them. You must insert them as Quote field codes. Please consult your Word documentation or contact Ortho2 if you need assistance.
Example IF statements - You can control your mail merge document output with conditional statements. These statements may be more or less elaborate as needed. Click here for examples of commonly used IF statements.
│
│
│
Ortho2.com │1107 Buckeye Avenue │ Ames, Iowa 50010 │ Sales: (800) 678-4644 │ Support: (800) 346-4504 │ Contact Us
Chat with Software Support │Chat with Network Engineering │ Chat with New Customer Care
Remote Support │Email Support │ Online Help Ver. 12/18/2015