Skip to main content

NC State Extension

Merge Instructions for Changing Case

Address data is typically stored in upper case to meet US Postal Service standards. It is often desirable to use mixed case in letters and other documents.

The solution is applied within Microsoft Word Merge fields. By adding some additional code to each of the merge fields, you can specify how you want the merged text to display.

The process is as follows:

  • Add merge fields to a document as you normally would
  • Display the Field Codes. There is a button in the Preview section of the Data Merge Manager that lets you do that, or you can highlight the codes, right-click and choose ‘Toggle Field Codes’

Here is an example for an inside address:

Merge fields display as:
«First» «Last»
«City», «State» «Zip»

Merge fields with Field Codes Displayed:

{ MERGEFIELD Address }
{ MERGEFIELD Address2 }

  • Add text within each merge code that you want converted to specify the case. The text is called a ‘Case Switch.’ The Case Switch options are:
Switch        Description
\* upper      To format the entire field as all caps
\* lower      To format the entire field in lowercase
\* firstcap   To capitalize the first word in the result
\* caps       To capitalize each word in the result

Example with the ‘\* caps’ switch

{ MERGEFIELD First \* caps} { MERGEFIELD Last \* caps}
{ MERGEFIELD Address \* caps}
{ MERGEFIELD Address2 \* caps}
{ MERGEFIELD City \* caps}, { MERGEFIELD State }   { MERGEFIELD Zip }

  • When you do the merge, every word in those fields with the caps switch will have the first letter in caps.

This process is described more fully here: