Creating Variables in Word

Microsoft Word implements variables as field codes. When you work with Microsoft Word source documents, typically you use variables defined in a Microsoft Word template by a Stationery designer. You import these variables into your Microsoft Word source documents when you apply the template to your source documents. After you import the variables, you insert the variables as appropriate.

Typically you should not need to create variables in your Microsoft Word source files if you use a Microsoft Word template created by a Stationery designer. However, in some cases you may need to create a variable in a Microsoft Word source document if you do not have a Microsoft Word template that includes a variable you need for your project.

The following procedure provides an example of how to create variables in Microsoft Word source documents using Microsoft Word 2003. Steps for creating variables in Microsoft Word may be different in other versions of Microsoft Word.

To create a variable in a Microsoft Word source document

Open Microsoft Word.

On the File menu, click Properties.

On the Custom tab, in the Name field, type the name of the variable you want to create.

In the Type field, select a type for the variable. A variable can be text, a date, a number, or a boolean value of yes or no.

In the Value field, type the value for the variable. The value you type is the value that Microsoft Word displays in your source document.