How to Fix Mail-Merge Number Formatting in Word 2010



Similar documents
MS Excel. Handout: Level 2. elearning Department. Copyright 2016 CMS e-learning Department. All Rights Reserved. Page 1 of 11

Create Mailing Labels from an Electronic File

Mail Merge Creating Mailing Labels 3/23/2011

What is a Mail Merge?

MICROSOFT WORD: MAIL MERGE

Template Guide. HTML . Release 8. This template guide is an overview of how to use and customize an HTML templates with Conga Composer.

Importing Contacts to Outlook

Intro to Excel spreadsheets

Microsoft Word 2013: Mail Merge

Explore commands on the ribbon Each ribbon tab has groups, and each group has a set of related commands.

ACADEMIC TECHNOLOGY SUPPORT

Microsoft Word 2010 Mail Merge (Level 3)

Word 2010: Mail Merge to with Attachments

Mail merging s: Word, Excel and Outlook

Using the Advanced Tier Data Collection Tool. A Troubleshooting Guide

Mastering Mail Merge. 2 Parts to a Mail Merge. Mail Merge Mailings Ribbon. Mailings Create Envelopes or Labels

Using AD fields in Policy Patrol

Creating and Using Databases with Microsoft Access

Indiana County Assessor Association Excel Excellence

Six Steps to Completing a Mail-Merge

Mail Merges, Labels and Message Merges in Word 2007 Contents

As in the example above, a Budget created on the computer typically has:

Introduction To Microsoft Office Excel Bob Booth July 2008 AP-Excel8

MAIL MERGE MADE EASY A STEP-BY-STEP GUIDE FOR LABELS OR MERGES

Getting Started with Excel Table of Contents

Migrating to Excel 2010 from Excel Excel - Microsoft Office 1 of 1

Top 15 All-Time Excel Hints & Tips

Microsoft Word 2003 Tips and Tricks

Use Mail Merge to create a form letter

EXCEL 2007 VLOOKUP FOR BUDGET EXAMPLE

Intro to Mail Merge. Contents: David Diskin for the University of the Pacific Center for Professional and Continuing Education. Word Mail Merge Wizard

Microsoft Word Mail Merge

Excel Intermediate Session 2: Charts and Tables

Converting an Excel Spreadsheet Into an Access Database

Advanced Excel 10/20/2011 1

Using Word 2007 For Mail Merge

How to Design a Form Report (RTF) Output

Advanced Presentation Features and Animation

Microsoft Office Access 2007 Basics

Using Mail Merge in Microsoft Word 2003

Using Mail Merge to Create Form Letters and Labels

Microsoft Migrating to Word 2010 from Word 2003

Microsoft Excel 2013: Macro to apply Custom Margins, Titles, Gridlines, Autofit Width & Add Macro to Quick Access Toolbar & How to Delete a Macro.

USER GUIDE. Unit 2: Synergy. Chapter 2: Using Schoolwires Synergy

Mail Merge Microsoft Word and Excel Queries Scott Kern Senior Consultant

IT Quick Reference Guides Performing Mail Merges in Word 2010

In-Depth Guide Advanced Spreadsheet Techniques

Mail Merge: Create Mailing Labels Using Excel Data and Filtering the Contents in the Data

Mail Merge Tutorial (for Word ) By Allison King Spring 2007 (updated Fall 2007)

Introduction to Microsoft Excel 2010

Microsoft Excel Basics

ITS Training Class Charts and PivotTables Using Excel 2007

Using Excel for Business Analysis: A Guide to Financial Modelling Fundamentals

AARP Tax-Aide Helpful Hints for Using the Volunteer Excel Expense Form and Other Excel Documents

Create Mailing Labels Using Excel Data (Mail Merge)

How to Mail Merge PDF Documents

Intermediate. Microsoft Excel Tables and Printing

CONTENTS. Introduction Outlook at a glance Configure Outlook 2010 on-campus Creating Folders Sorting s...

LEGISLATOR DATABASE. September, 2012

The first thing to do is choose if you are creating a mail merge for printing or an merge for distribution over .

Microsoft Office. Mail Merge in Microsoft Word

How To Understand The Basic Concepts Of A Database And Data Science

Outlook . User Guide IS TRAINING CENTER. 833 Chestnut St, Suite 600. Philadelphia, PA

Excel 2007 A Beginners Guide

ACCESS Importing and Exporting Data Files. Information Technology. MS Access 2007 Users Guide. IT Training & Development (818)

Using Microsoft Excel to Manage and Analyze Data: Some Tips

FrontStream CRM Import Guide Page 2

Q&As: Microsoft Excel 2013: Chapter 2

WEBFOCUS QUICK DATA FOR EXCEL

INTRODUCTION TO CONSTANT CONTACT Marketing Program

Microsoft Excel 2013: Headers and Footers

Excel macros made easy

Crystal Reports Designer

Using Microsoft Office to Manage Projects

WHAT S NEW IN MS EXCEL 2013

Mail Merge. Course Description. Objectives: Design a Main Document. Design a Data Source. Directories. Merge the Main Document with the Data

Using Microsoft Access Databases

How to Use Excel for Law Firm Billing

Microsoft Excel Understanding the Basics

Module One: Getting Started Opening Outlook Setting Up Outlook for the First Time Understanding the Interface...

Microsoft Using an Existing Database Amarillo College Revision Date: July 30, 2008

How to Create a Spreadsheet With Updating Stock Prices Version 3, February 2015

Reporting Tips and Tricks

Programming in Access VBA

Instructions: Using Mail Merge in Word to Send E mails via Outlook

Spreadsheet - Introduction

Commonly Used Excel Formulas

Spreadsheet User Guide. First-Year Course

ArcGIS Tutorial: Adding Attribute Data

Making a Web Page with Microsoft Publisher 2003

Analyzing Data Using Excel

HOUR 9. Formatting Worksheets to Look Great

Handout: How to Use Excel 2010

Mail Merge (Microsoft Office 2010)

Creating an Excel Spreadsheet for Mail Merge. Excel Spreadsheet Mail Merge. 1 of 9 Design & Print Offline: Mail Merge

Excel 2003: Ringtones Task

Integrating Microsoft Word with Other Office Applications

Basic Excel Handbook

Charting LibQUAL+(TM) Data. Jeff Stark Training & Development Services Texas A&M University Libraries Texas A&M University

Sage Intelligence Report Designer Add-In

Transcription:

How to Fix Mail-Merge Number Formatting in Word 2010 By Rich Malloy, Tech Help Today, June 2012, updated Nov. 2012 When 93.90 turns into 93.90000000006, there are no less than three ways to put things right. The Mail-Merge feature of Microsoft Word is one of my favorite parts of the program. It is extremely powerful for creating labels and customized letters, emails, or reports. Once you learn how to use it, you can save countless hours of work. Unfortunately, the task of learning to master all of its idiosyncrasies can give you countless headaches. One of the perennial annoyances of Mail-Merge is its inability to format numbers from an Excel spreadsheet correctly. For example, a sales result in Excel appears as 93.90 but in Word it suddenly becomes 93.900000000000006! Fortunately, there is a way to fix this. In fact, there are three ways. We can modify the spreadsheet, modify the Mail-Merge document, or simply modify the way the two files connect to each other. Although this last approach is little known, for many users it is certainly the best. Note for users of Office 2007 and Office 2003: The steps presented here are for Office 2010, but the steps needed for older versions of Word and Excel are very similar if not identical. 1. Modify the Excel Spreadsheet The first way is to avoid the problem: In the Excel worksheet, insert a column with a formula that converts the Excel numbers or dates into a text format that is exactly the same as what you would want to appear in your Mail-Merge document. To do this, you need to use Excel s TEXT() function, which enables you to convert a number or date into its equivalent text formatted exactly the way you desire. The downside is that you need to know certain formatting codes. Although these codes are identical to those used in the Custom Number formatting feature of Excel, they are rarely seen by most Excel users. For example, the formulas TEXT(B3, "$#,##0.00") and TEXT(C5, "M/dd/yy") convert number and date data into text data (in this case, $12,345.67 and 12/01/10 ). (Tip: While you are in Excel, set these formulas in a different style, say, italic, or some unusual color to remind you that these numbers are simply text. They cannot be used in calculations.) The advantage of formatting numbers and dates as text is that text is transported from Excel into a Word Mail-Merge document unmolested. Well, almost unmolested. Formatting options such as font, size, and color do not make the trip. Rich Malloy is owner / chief consultant at Tech Help Today, a computer-consulting service based in Greenwich, CT. A seasoned veteran of the computer industry, Rich provides high-quality on-site assistance for a vast array of computer problems afflicting residential and small-business clients in Fairfield and Westchester Counties. In his spare time, he teaches as a part-time professor. Contact him at www.techhelptoday.com.

Format Codes for Excel s TEXT() Function A collection of the most commonly used codes is presented below. A key thing to remember is that 0 signifies a digit that will always appear even if zero, while # specifies a digit that will appear only if it is not a leading or trailing zero. Thus, the code 00000 will ensure that the leading zero is not truncated from New Jersey postal zip codes. These codes for numbers, dates, and times can be used in the TEXT function or in Excel s Custom number formats. As an extra bonus, they can also be used in the Numeric Switches in Word Mail-Merge Fields described in the next section. Unfortunately, there is a slight difference between the way these codes work in Excel and Word in Microsoft Office 2010. In Excel, you can use either M or m for months or minutes. In almost all cases, Excel is smart enough to figure out which units you are talking about. But Word is not so smart, and you must use the capitalized letter to refer to months. Also, Excel has an additional code, MMMMM, which returns a single letter abbreviation for the month (e.g., J, F, M, A, ). Formatting Codes for the Excel TEXT() Function Code Sample Result 00.00 01.10 #,##0.## 1.1 D or d 1 DD or dd 01 DDD or ddd DDDD or dddd Supplementing a spreadsheet table with a few TEXT() functions is a simple and direct approach. If you are using more than one or two these functions, however, your M Mm S or s 1 01 1 spreadsheet soon becomes cluttered with seemingly redundant SS or ss 01 columns. Analyzing the spreadsheet becomes impossible, and H 23 there is great likelihood that you will mistakenly use a h am/pm 11 PM TEXT() function as input for a calculation, thereby yielding nonsense results. Our advice here is to put all your TEXT() functions on another worksheet, entitled something like Data for Mail Merge. Handle with Care: The ROUND() Function Instead of the TEXT() function, some users prefer to use the ROUND() function to trim off extra decimal places. As its name implies, Excel s ROUND() function will permanently round a number up or down to the number of decimal places you specify. The advantage is that the rounded number is not text and can still be used for further calculations. In many cases, the ROUND() function will work well with Mail Merge, but you may want to steer clear of it because of the following reasons: 1. The Round() function will not preserve the dollar sign or the thousands separator (comma) 2. The Round() function will truncate trailing zeros 3. The Round() function sometimes causes MailMerge to display the wrong number of decimal places. For example, a MailMerge document occasionally shows 4 decimal places when the Round() function had specified 2 or 3. Tue Tuesday M 1 MM 01 MMM MMMM Jan January YY or yy 99 YYYY or yyyy 1999 H or h 1 HH or hh 01 Rich Malloy, www.techhelptoday.com Page 2 of 5

4. In rare cases, the Round() function causes MailMerge showed a slightly different number. For example, instead of displaying 1.0014, MailMerge showed 1.0013. 2. Use a Numeric Switch in Word The second way to cajole Mail Merge into displaying numbers from Excel correctly is to modify the Word document. Specifically, this means applying the desired number format code to the Merge Fields in the Word document. (The merge fields basically tell the Word document which column in the Excel table has the desired data.) To apply a format to a field, you must include a numeric switch (formerly called a picture switch) in the field s field code. The first thing you have to do is to see the actual field code. Open the Mail-Merge document and click the Mailings tab at the top of the window. Be sure the Preview Results button is toggled off so that you can see the Mail-Merge fields. Then right-click a Mail-Merge field (such as «Donation») and choose the Toggle Field Code option. You should now see the actual field code for that field, which is designated by curly braces as in { MERGEFIELD Donation }. Now edit the field code by simply inserting a numeric switch code to the end of the field code, as in { MERGEFIELD Donation \# $#,##0.00 } There are many picture codes available. Here are three examples and their results: { MERGEFIELD Cost \# 00.00 } 01.00 { MERGEFIELD Sales \# $### } $ 15 { MERGEFIELD Sales \# $#,##0.00 } $ 1,500.00 { MERGEFIELD Date \@ "MMMM d" } November 26 As you can see, the numeric switch codes are identical to the Excel formatting codes except that they are preceded by \# for numbers and \@ for dates. To see more of the codes available, refer to the table above, or see the online help for numeric switch in Word 2010. Here are some examples of how the numeric field codes work with data in a column labeled Sales in an Excel spreadsheet. Numeric Switches for Mail-Merge MergeFields Excel Data Field Code Word Result 12345.2345 { MERGEFIELD Sales \# $#,##0.00 } $12,345.23-12345.2345 { MERGEFIELD Sales \# $#,##0.00 } $-12,345.23 12345.2345 { MERGEFIELD Sales \# $,#,##0.00 } $12,345.23 5.67 { MERGEFIELD Sales \# 0,000 } 0,006 5.67 { MERGEFIELD Sales \# 0.## } 5.67 5 { MERGEFIELD Sales \# 0.## } 5. 5 { MERGEFIELD Sales \# 0.00 } 5.00 0.67 { MERGEFIELD Sales \# 0.## } 0.67 0.67 { MERGEFIELD Sales \# #.## }.67 12345.2345 { MERGEFIELD Sales \# # ##0.00 } 12 345.23 Rich Malloy, www.techhelptoday.com Page 3 of 5

In light of the fact that Word and Excel use the same formatting codes, we could not help wondering why they don t use the same function format. For example, why not have the MergeField function look something like: { MERGEFIELD(Donation,"$#,##0.00") } Good question. You ll have to ask Microsoft. Note: Before you start cursing me out, try to remember that when you add or change a numeric switch, the effect is not shown immediately. You either have to update the field (right-click it and choose Update Field), or click the button Mailings > Preview Results 2 or 3 times, or if you are using the Mail-Merge Wizard, you will have to go back a step and return to see the effect of your changes. (I am not making this up. Remember, only geniuses work at Microsoft. We are just not smart enough to appreciate their brilliance.) The numeric switches in merge fields work well, but I find the process very difficult to remember. ( Is it a forward slash or a back slash? ) Also, it is very easy to make a mistake. Fortunately, there is another way. 3. Use a DDE Link The above approaches are relatively simple, but if you have more than a few fields that require formatting, they can drive you into early retirement. At the very least, they require you to remember format codes that, while similar, are used in very different ways. A much more elegant and simple solution is to have Word link to the Excel workbook via a DDE (Dynamic Data Exchange) link rather than the usual, presumably non-dynamic, linking process. That sounds a little daunting, but if you can do Mail-Merge, then DDE is a piece of cake. It is a simple two-step process, and the first step enabling Word to open a file via DDE has to be done only once. To set up Word 2010 for DDE links, do the following: Click File > Options. Click the Advanced tab on the left and scroll down to the section General. Check the box labeled Confirm file format conversion on open. That s all for the first step, and you never have to do it again. From now on, your copy of Word can open up many different types of files, and can open these by different avenues, including DDE. The only side effect of the above is that every time you open a non-word file with Word, the program will give you a chance to change your mind. No problem. The second and last step has to be done each time you select a data source for your Mail-Merge operation (either in Step 3 of Word s Mail-Merge Wizard or after you press the Select Recipients button in the Mailings ribbon). Relax. It is just three additional mouse clicks: After you have chosen the data file you would like to use, a new Confirm Data Source dialog box will appear. After you choose a data file, the Confirm Data Source dialog box will appear. Rich Malloy, www.techhelptoday.com Page 4 of 5

How to Fix Number Formatting in Mail Merge The default type of link is by OLE, but that is not what you want. In the Confirm Data Source dialog box, click the check box to Show all. In the expanded list of file types, choose MS Excel Worksheets via DDE (*.xls). (Choose this even if you are using the newer Excel file format: *.xlsx.) If asked, confirm that you are selecting the Entire Spreadsheet. If you have already selected a spreadsheet for your Word document, you may have to select it again, this time via a DDE link. That s it! From now on, your Excel formatting will travel over to Word Mail-Merge documents fairly intact. One huge caveat here: Make sure that the data you want to merge are in the first sheet of your Excel workbook. (It took us two hours to finally figure out that DDE does not see anything but the first Excel worksheet.) Sounds good. So, you ask, if this is so good, why didn t the geniuses at Microsoft simply do this by default? Another good question. In previous versions of Word, there were a few minor downsides to this approach. But in my tests with Word 2010, these problems seem to have been fixed. But for how long? It is perhaps significant that the DDE link option refers only to the old *.xls file format rather than the new one used by Excel 2007 and 2010. Can Microsoft be trying to sunset this option? Let s hope not. [Some of the ideas expressed above are from C. Dudas on the Web.] To see an option for DDE linking, you have to click the check box for Show all. Rich Malloy, www.techhelptoday.com Page 5 of 5