Microsoft Word 2007 brings some changes to how Mail Merge works. On top of this, Windows XP Service Pack 2 and Service Pack 3 change some settings that effect mail merges that depend on Dynamic Data Exchange (DDE). By default, Word 2007 also turns off the ability to connect to documents that are on a server. This document will walk you through the steps you need to make your old mail merge procedures work in Office 2007.
Choosing a Communication Protocol
Mail merges usually consist of two documents: an Excel spreadsheet or Access database, and a Word document. When you initiate a merge, Word needs a way to communicate with Excel or Access, so that it can request and receive the data from the file containing your merge data. There are two main protocols that can be used for this communication: DDE and Object Linking and Embedding (OLE).
DDE is an older technology that trasfers the data in a text format; most mail merges that we see on campus are set up to use DDE to transfer. OLE is a newer technology that uses a binary format to communicate. There are trade-offs with each technology, and unfortunately you need to understand them before you do your mail merge.
DDE
Enabling Network DDE
If you are using DDE to connect to a document on a server, you must first enable DDE to communicate over the network. This is a setting that is turned off in Windows XP when Service Pack 2 or Service Pack 3 is installed.
These settings should remain set, but installing Windows XP Service Packs may change them.
Enabling DDE use in Word
Whether you're using a local or a server data file, you must explicitly enable use of DDE in Word.
This setting will be saved until you change it.
Choosing DDE as your Communication Method
When you're ready to do your merge, you won't automatically be given the choice to use DDE; you must instruct Word to give you that choice.
That's it! When you Finish & Merge, you should get your data formatted as it's formatted by Excel or Access.
OLE
Using OLE for mail merge is a straightforward process, except for the step of formatting your data. The data that Excel receives is in its raw numeric format, unless it's marked as text in the source application. What this means is that zip codes lose their leading zeroes and nine-digit zip codes lose their hyphens, and monetary values come over as plain numbers. In order to display them in a formatted manner you must provide formatting codes in your Word document.
OLE Formatting Codes
If you're familiar with mail merges, then you're used to seeing place holders in your document for the fields that will be filled in from your data source, such as <<first_name>>, <<zip>> or perhaps <<donation>>. These are known as "merge fields," and they vary depending on your data source, so your actual merge field names might be completely different.
Tied to each of these fields is a format that's hidden from you by default; to see the formatting info in your Word merge document, use the key combination <Alt>-F9 (i.e. hold down the "Alt" key while you press the F9 key). When you do that you will see a different representation of your document, with curly braces and "MERGEFIELD" surrounding or preceding each merge field. Press Alt-F9 again and you'll see the layout you're used to.
When you are in the Alt-F9 MERGEFIELD layout, you can add formatting codes to define the formatting of numeric data, much the way you can use Custom Format in Excel to format numeric data.
Some helpful format commands are given below. To enter them, first use Alt-F9 to uncover the MERGEFIELD formats. Entering the special curly braces is done by using Ctrl-F9 (holding down the Control key and pressing the F9 key). "Zip" and "Amount" should be replaced with your data source's actual field names.
| To Format... | Use... | Result |
| 5 digit zip codes | {MERGEFIELD Zip \#00000} | 01002 |
|
Zip+4 zip codes |
{MERGEFIELD Zip \#00000'-'0000} | 01002-1234 |
| Mixed zip codes |
{IF {MERGEFIELD Zip}>99999 "{MERGEFIELD Zip \#00000'-'0000}" "{MERGEFIELD Zip \#00000}"} |
01002 or 01002-1234 |
| Currency, thousands separator, rounded with no decimal places | {MERGEFIELD Amount \#$,0} |
$1,234,568 |
| Currency, thousands separator, 2 decimal places | {MERGEFIELD Amount \#$,0.00} |
$1,234,567.89
|
Enabling Communication with a Document on a Sever
If your merge data is not on your local hard drive (for instance, if it's on newmisserver), you must tell Word that you "trust" the location where it resides. This is true for both DDE and OLE connections. You do this through the Trust Center:
© 2013 Hampshire College 893 West Street Amherst, MA 01002 . 413.549.4600