Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
When you work with the mail merge tools—lists, sorting, filtering—you’ve entered the realm of database programming. Whether you know it or not, you’re doing the same things that full-time database developers do for huge corporations every day. Why not move up to the next level—and apply some advanced fields to your merges.
The mail merge manager inserts special merge fields into your documents but shields you from some of the nitty-gritty programmer’s details. In your document, you see simple <<FirstName>> and <<LastName>> placeholders, but the field codes behind those placeholders is a little more complex. To get a glimpse, you can display field codes in your document by going to Word→Preferences→View and then turn on Field Codes. You’ll see your filed codes look something like this: {MERGEFIELD FirstName}. Fields begin and end with curly brackets and the first word in caps is basically a command. In this example the command says during mail merge put the FirstName here. There are a number of fields you can use in addition to MERGEFIELD. To see them, choose Insert→Field and, in the Categories list, choose Mail Merge. The scrolling list on the right shows the Fields (commands) you can insert into your document when you’re working on a mail merge project.