Mail Merges, Labels and Email Message Merges in Word 2007 Contents Introduction to Mail Merges... 2 Mail Merges Using the Mail Merge Wizard... 3 Creating the Main Document... 3 Selecting the Data Source... 4 Inserting Merge Fields into the Main Document... 6 Appearance of Merge Fields in Your Main Document... 7 Previewing and Printing... 8 Mail Merges Using the Mailings Tab Commands... 10 Creating the Main Document... 10 Selecting the Data Source and Records... 10 Inserting Merge Fields into the Main Document... 11 Previewing... 11 Merging and Printing (Allows you to Edit Individual Letters)... 12 Printing (Without Seeing the Form Letters)... 12 Creating Labels... 13 Creating the Labels Document... 13 Selecting the Data Source and Records... 14 Inserting Merge Fields into the Label... 15 Updating Labels... 16 Previewing Labels... 16 Completing Merge and Printing... 17 Printing (Without Seeing the Merged Label Document)... 17 Saving the Label Document... 17 Creating a New Label / Customizing a Label to Specific Dimensions... 17 Email Merges... 19 Setting up the Excel data source... 19 Creating the Message Text and Preview with Data... 19 Merging to Email Messages... 20 IT Services, UCL Institute of Education, April 2010
Introduction to Mail Merges Data from an Excel database can be merged with different types of Word documents to create merged documents in order to save you vast amounts of time and the need for retyping. As Excel databases are more versatile than the basic Word data files which you can set this guide concentrates on using Excel databases as the data source. One of the most common uses for merging is the production of letters (duplicate letters where each contains different personal information such as name, address, order number etc.) Alternatively, instead of letters you could be producing certificates, forms or tables. MERGING IS A 3 STEP PROCESS Step 1: Create the Data Source Step 2: Create the Main Document TIP: In order to help you successfully merge Excel data with Word documents you need to make sure that you have field (column) headings in row 1 and the records beginning in row 2. Step 3: Merge the data with the Main Document There are two main methods of carrying out a merge: Using the Mail Merge wizard Using the Mailings tab commands on the ribbon This guide describes both methods. Have a look at both methods and use the one that seems the easiest to use for you. Page 2
Mail Merges Using the Mail Merge Wizard it is a good idea to carry out your first few merges using the Mail Merge Wizard as it prompts you as to what to do at each stage of the process. In the following example we will look at performing a letter mail merge. The notes assume you already have an Excel data source/file. Creating the Main Document 1. Open an existing letter/certificate/document or write a new one leaving gaps where data from the database is to go 2. Go to the Mailings tab and locate the Start Mail Merge group 3. Click on the Start Mail Merge command button and select the Step by Step Mail Merge Wizard option The Mail Merge Task pane will open and will be displayed on the right side of the screen. You will be taken to Step 1 of the Mail Merge wizard. (Step 1 of 6 Steps) 4. Select the type of document you wish to produce. NOTE: Select Letters whether you wish your main document to be a letter or another Word document such as a certificates, coupons or forms. 5. Click on Next to move to the next step of the wizard 6. In Step 2 of the wizard you are asked to select which document to start from. As the active window is your letter select Use the current document. It now becomes known as the Main Document. 7. Click on Next to move to the next step of the wizard. Page 3
Selecting the Data Source 8. In Step 3 of the wizard you need to select a data source. Assuming you have already created a data source file such as an Excel list/database, select the Use an existing list option. TIP: You may select to type a new list if you do not already have a data source and do not wish to create one in Excel. It will be obvious where you need to enter your data. You will be prompted to save the file. Note that the data source file by this method is saved in a Microsoft Office Address list format and is given the extension.mdb 9. Click on the Browse option 10. Locate the data source file you require for the mail merge and double click on it. TIP: If you cannot locate any Excel files make sure the Data Source option is set to All Data Sources. 11. Accept the suggested data source and click OK Page 4
12. The following dialogue box may appear prompting you to select which worksheet you wish to use select the appropriate one (usually sheet1) and click OK. 13. The data which will be used for the merge is displayed for you in the Mail Merge Recipients dialogue box, see picture below. Field heading name Field heading filter arrow Absence of a tick means this whole record will be omitted from the mail merge Click for Advanced Filtering If you are happy to have ALL the records merged and in the order they are listed click OK. If not you have the opportunity here to: a) filter the data so only the records you require will be merged, and/or b) sort the data so the letters are printed in a particular order. a) Methods of Filtering Data I) USING THE CHECKBOXES Remove or add ticks from or to the record checkboxes to indicate which records you wish to be included in the merge and which ones you do not. II) CLICKING ON THE FIELD HEADING ARROWS Click the filter arrow by any field heading and then select from drop down list. For example in the case of the field address2 you could select Hammersmith so only those people living in Hammersmith are included in the mail merge. You may filter from two or more field headings, for example, select all those who live in a particular town AND play a certain musical instrument. Page 5
III) MORE ADVANCED FILTERING You may wish to filter for people coming from either of two different towns, i.e. two entries from the same field (column). In this case an advanced filter is needed. Click on the down arrow by any field heading and select (Advanced). You may set very specific criteria for your filter from the dialogue box which appears. An example is shown opposite. b) Sorting Data Click on any field heading and the records will be sorted based on that field. One click will sort a list by that field in an ascending alphabetical/numerical order, another click will then sort in descending order. Once you have filtered and/or sorted click OK. 14. Click on Next at the bottom of the task pane to move to the next step of the wizard Inserting Merge Fields into the Main Document 15. In Step 4 of the wizard you are prompted to write your letter if you have not already done so. To complete your letter you need to do two things: Type into the letter anything that is to be common to all letters Insert merge fields to act as placeholders for the unique text you wish to be inserted from the database when you carry out the merge. To insert a mail merge field you can use any of the options provided in the task pane. The Address block and Greeting Line options predict what is required and insert the appropriate merge fields for you. You may wish to use More Items so you can carefully control which fields are being entered. The Address Block and More Items options are detailed on the next page. Page 6
USING THE MORE ITEMS OPTION TO INSERT FIELDS Clicking on the More items option will open up the Insert Merge Field dialogue box. You will notice that the list of fields correspond directly to the field headings of your data source. For every field you wish to insert you need to: i) Position the I beam in your document where the field is to go ii) Select More items to bring up the Insert Merge Field dialogue box iii) Select the field you require iv) Click the Insert button and then the Close button. (If you do not close the dialogue box you will not be able to move your I beam to a new location) USING THE ADDRESS BLOCK OPTION TO INSERT FIELDS Clicking on the Address Block option will open up the Insert Address block dialogue box. With this method Word allows you to select how the full name is displayed and initially guesses how you want the address displayed. Soemthime this method is more trouble than it is worth as it relies on your field names being the same or very similar to the ones Word has predicted or initially selected. It is possible to correct any fields not picked up by clicking on the Match Fields button and selecting the correct fields. But this can be time consuming and confusing. Using the More Items method described above may be the easiest method for you too. Appearance of Merge Fields in Your Main Document When a merge field is inserted into the main document it can be easily identified as it will be enclosed by double chevrons. The name of the merge field is the name of the field from the data source. Page 7
TIP: Take care when adding spaces between the merge fields. Remember to put in punctuation as if you were typing in the full text yourself, ie. commas, spaces and returns. For example you need to add one space between the merge fields and a comma after the last merge field: <<Title>> <<FirstName>> and <<Surname>>, to give: Mr Harry Biggins, FORMATTING MERGE FIELDS Any merge field can be selected and formatted, such as having the font or font size changes, or having bold or italics switched on. This is done in exactly the same way as normal text in Word, i.e. select the merge field and then apply the formatting. 16. When you have completed the letter and all the merge field insertions click on Next at the bottom of the task pane to move to the next step of the wizard. Previewing and Printing 17. Step 5 of the wizard allows you to preview all your letters one by one. In this step the merge field codes will be substituted by the actual data from your data source. Use the chevron buttons to cycle through the letters so you can preview each letter to a different recipient. EXCLUDING A RECIPIENT If you wish to exclude a person from the mail merge once their record information is displayed click on the Exclude this Recipient button located on the task pane. 18. When you have previewed all the letters you need to click on Next to move to the next step of the wizard. Page 8
19. Step 6 is the final step of the wizard. Instructions on what to do in this step are given on the task pane. Your choice are: Click on Print. This will allow you to print all the merged letters without having to see the merged document. (This Print command is equivalent to Print Dcouments command button on Mailings tab) Once you select Print, a dialgoue box will appear asking you to specify whether you wish to print all records or select a range of records. The number range you enter will correspond to the order the records are listed in the recipients list. Click on the Edit individual letters option. This will allow you to edit individual letters without affecting any others. Once you select this option the main document and data source will have merge to create a new document containing all the letters separated by a Next Page Section Break. The resulting document is sometimes referred to as the Form Letters, even if is a certificate or a type of document other than a letter. Scroll through all the merged letters and make any necessary edits. You can print directly from here using the normal Word Print command. To make the same changes to all the letters switch back to the original document, i.e. the Main Document. Make your edits and then merge again. TIP: You may sometimes find it confusing working with a Main document and merged document and find it hard to work out which you are in at any one time. Your Main Document is usually one page long Your merged document is usually many pages long, depending upon how many recipients you selected to merge with. The default name given to a merged document is Lettersx, where x is the number indicating how many merged documents you have produced. Page 9
Mail Merges Using the Mailings Tab Commands Instead of going through the Mail Merge wizard on the task pane you can carry out all the steps of a mail merge using the commands located on the Mailing tab. Creating the Main Document 1. Open an existing letter or write a new one leaving gaps where data from the database is to go 2. Go to the Mailings tab and locate the Start Mail Merge group 3. Click on the Start Mail Merge command button and select the type of document you wish to produce, for example the Letters option Selecting the Data Source and Records 4. Click on the Select Recipients command button on the Mailings tab 5. Select the Use Existing List option 6. Locate the data source file you require for the mail merge from the Data Source dialogue box which appears. 7. Accept the suggested data source and click OK 8. The following dialogue box may appear prompting you to select which worksheet you wish to use select the appropriate one (usually sheet1) and click OK. Page 10
9. If you wish to view the data present in the data source or you wish to sort and/or filter the data click on the Edit Recipients command button on the Mailing tab. This will display the mail merge dialogue box. See pages 5 and 6 for instructions on how to filter and sort the data using the Mail Merge Recipients dialogue box. Inserting Merge Fields into the Main Document 10. Use the Address Block, Greeting Line or Insert Merge Field command buttons located on the Mailings tab to insert all the necessary merge fields into your main document. Pressing these buttons will bring up the same dialogue boxes as those which are displayed when you press the associated buttons on the Mail Merge task pane. For more information on using these dialogue boxes and merge fields see pages 6-8. NOTE: If you click on top half of the Insert Merge Field button the Insert Merge field dialogue box will appear. If you click on the bottom half of the Insert Merge Field button a drop down list showing all the fields from the data source will appear. Click on the field you require. When you do this that field will be inserted into your document and the list will close automatically. Working with this drop down list can be a faster way of working that the dialogue box. Previewing 11. Click on the Preview Results button (Preview Results group of the Mailings tab). This will display the main document merged with information from the selected data records. You will see one letter with information from one record at a time. Use the navigation buttons to preview the letters one by one. Page 11
Merging and Printing (Allows you to Edit Individual Letters) 12. Click on the Finish & Merge command button (Finish group of Mailing tab), then click on Edit Individual Documents A dialgoue box will appear asking you to specify whether you wish to merge all records or select a range of records. The number range you enter will correspond to the order the records are listed in the recipients list. Click OK when ready. The main document and data source will now have merged to create a new document containing all the letters separated by a Next Page Section Break. The resulting document is sometimes referred to as the Form Letters, even if is a certificate or a type of document other than a letter. 13. You can now scroll through the letters to make sure everything is correctly positioned and add any extra information to any individual letters that requires it. 14. When you are happy with all the letters select the Print command in the normal way. Printing (Without Seeing the Form Letters) Click on the Finish & Merge command button (Finish group of Mailing tab), then click on Print Documents A dialgoue box will appear asking you to specify whether you wish to print all records or select a range of records. The rumber range you enter will correspond to the order the records are listed in the recipients list. Word now carries out the merge and printing in one go. You never actually see the resulting merged document. This is useful for it speeds up the merging process but relies on you not needing to add any extra information into any particular letter. Page 12
Creating Labels If you need to create labels for all or some of the people listed in your Excel database/list you can again go through Word s mail merge facility. The notes provided here are based on using the commands on the Mailings tab. You can also use the Mail Merge wizard and follow the notes and prompts provided in the task pane. CREATING LABELS IS A 3 STEP PROCESS Step 1: Create the Data Source Step 2: Create the Labels Document in Word TIP: In order to help you successfully merge Excel data with Word labels you need to make sure that you have field (column) headings in row 1 and the data beginning in row 2. Step 3: Merge the Data with the Labels Document Creating the Labels Document 1. Start a new Word Document 2. Go to the Mailings tab and locate the Start Mail Merge group 3. Click on the Start Mail Merge command button and then on the Labels option Page 13
4. In the Label Options dialogue box which appears specify: the type of printer you are going to use (either continuous feed or page printer) the label type you have, i.e. select the label vendor and also a product code. 5. Click OK. TIP: If the vendor and/or product code for the labels you are going to use are not listed in the Label Options dialogue box you will need to create a new label. To start this off click on the New Label button. Further instructions are given in the chapter Creating a New Label / Customizing a Label to Specific Dimensions on pages 17-19. Word has now created a document that uses a table to lay out the labels. You should see lines separating the labels in the layout. Selecting the Data Source and Records 6. Click on the Select Recipients command button on the Mailings tab 7. Select the Use Existing List option Page 14
8. Locate the data source file you require for the mail merge from the Data Source dialogue box which appears. 9. Accept the suggested data source and click OK 10. The following dialogue box may appear prompting you to select which worksheet you wish to use select the appropriate one (usually sheet1) and click OK. Word has now connected the labels to the Excel data but the sheet of labels is still blank. What is present on each label is a code which is essential for the label layout. 11. If you wish to view the data present in the data source or you wish to sort and/or filter the data click on the Edit Recipients command button on the Mailings tab. This will display the Mail Merge Recipients dialogue box. See pages 5 and 6 for instructions on how to filter and sort the data using the Mail Merge Recipients dialogue box. Inserting Merge Fields into the Label 12. Use the Address Block, Greeting Line or Insert Merge Field command buttons located on the Mailings tab to insert all the necessary merge fields into your main document. For more information on using these commands see pages 6-8. Page 15
TIP: You can also type in any information you wish to be present on all the labels, such as logos, or in the case of creation of name badges, you can add the name of the event. Label document with merge fields and event name Updating Labels 13. Once you have finished setting up the first label click on the Update Labels command button (Mailing tab, Write & Insert Fields group). This will replicate the layout of the first label to all the other labels. Previewing Labels 14. Click on the Preview Results button (Mailings tab, Preview Results group) to display the labels document merged with information from the data source. To navigate around Use the navigation buttons to allow you to move sequentially through the records. Use the Find Recipients button to find a particular record. This button will bring up a dialogue box where you can type in a name to be searched. Page 16
TIP: You can still at this point use the Edit Recipients command button to select or deselect people/records to be included in your merge. Completing Merge and Printing 15. Click on the Finish & Merge button (Mailings tab, Finish group) 16. Select the Edit Individual Documents option 17. This creates a merged document separate from the label document. You can scroll through the document pages and check all the labels and make any edits you require to any individual label. 18. Print the merged labels document in the normal way. Printing (Without Seeing the Merged Label Document) You only need to go as far as step 13 or 14 above. Then click on the Finish & Merge command button (Finish group of Mailing tab), then on Print Documents Word now carries out the merge and printing in one go. You never actually see the resulting merged document. This is useful for it speeds up the merging process but relies on you not needing to add any extra information into any particular label. Saving the Label Document If you are likely to need to print labels for these records again it is worthwhile saving the Label Document and not the merged label document. Saving the latter will not take into account any updates made to the excel data source. If you save the Label Document and use that in the future it will ensure any edits or new additions to the data source will be reflected in the merged label document produced. Creating a New Label / Customizing a Label to Specific Dimensions In most cases the label sheets you are going to use will be listed in the Labels Options dialogue box and you will not be required to specify the exact dimension of the labels. In some cases the labels may not be list. In this case you will need to create a new label and customize it. Page 17
1. Follow steps 1 3 on page 13 to display the Labels Options dialogue box 2. Click on the New Label button located at the bottom of the dialogue box 3. Enter a name for the new label you are creating 4. Measure all the necessary dimensions carefully on your label sheet and then enter the values into the dialogue box. Watch the Preview at the top of the dialogue box as you enter the measurements to make sure the preview is beginning to resemble your label sheet. TIP: The Preview also serves as a diagram to help you understand what the required entries are. Some extra notes are given below: The margin is the distance between edge of sheet and where label starts Horizontal pitch is the distance between first label starting to next label starting 5. When you are ready click OK You will see your new label name listed under the Product number. Also, the vendor will be Other/Custom. TIP: When you need to create labels on a future date using the same labels simply go to the Label Options dialogue box, select Other/Custom vendor and the label name under the product code. Page 18
6. Click OK. Word has now created a document that uses a table to lay out the labels based on the new label you created. TIP: If the size or dimensions of the labels (i.e. the table layout) are not quite right you can click and drag the layout lines to any position. Although note, to change the size of the top and bottom margin you need to do it in the normal way using the ribbon commands or the ruler. But please note, these click and drag changes will not be updated on the saved label information The Label document is now ready for you to use to create and print your labels. To continue with this process pick up from step 6, page 14. Email Merges These days email merges are becoming popular, especially because they are faster, more efficient and cheaper than the traditional letter mail merge. The message text and merge fields are actually set up in a Word document in exactly the same way as they are for normal mail merges. Then in the final step you will need to select to Send E-Mail Messages. Setting up the Excel data source The Excel database is set up in the same way as for other merges but the important requirement is that you include one field/column for email addresses. If you name the column with an appropriate name it will be picked up automatically as the email address field. I.e. name it email address. Creating the Message Text and Preview with Data Create the message text in a new Word document as if you were going to carry out a normal mail merge. The message text can include: text which is to be consistent across all messages and merge fields for text which is to be taken from the data source. If you wish to use the Mail Merge Wizard follow steps 1-17 on pages 3-8. If you wish to use the Mailing tab commands follow steps 1-11 on pages 10-11. NOTE: When you preview your results you can only see the results for one record at a time and the message text is still in Word. You will not be able to preview each or all the messages within Outlook itself. If you make any changes to any text at any time the edits will be present in all messages, i.e. you are changing the body text to be merged for all messages and not individual messages. Page 19
Merging to Email Messages When you are ready with your message text and selected recipients you will need to complete the merge and send off the email messages. 1. Click on the Finish & Merge button (Mailings tab, Finish group) and select the Send E-Mail Messages option Or, if you were using the Mail Merge Wizard click on the Electronic Mail link in Step 6 of the wizard 2. In the Merge to E-mail dialogue box which appears, for the To: box, select the name of the field where the email addresses are stored in the Excel data source. 3. Enter the Subject line information, i.e. the Subject line text for all the email messages going out 4. Select an alternative file format if necessary 5. Select a range of records to be included in the merge or leave as All 6. Click OK Email addresses The email messages are now sent out. The message text you typed up in the Word document will be included in the body text of the messages. NOTE: It is not possible to send attachments with merged messages. Also, it is not possible to edit individual messages. DIFFERENT VERSIONS OF MESSAGE REQUIRED FOR DIFFERENT GROUPS OF RECIPIENTS? If you have 3 different messages to send to different groups of recipients, for example, a different message depending upon which country they live, you will need to carry out 3 merges. For each message, filter the recipients list to only display those living in a particular country and then proceed with the merge. Page 20