Friday, November 06, 2009

Preserving Leading Zeros when Merging from Excel to Word

I interrupt this blog with the solution to a problem that's been dogging my steps for years. I figured that if it's been causing me problems; it's been causing others problems too.

To preserve leading zeros:

Choose "special / zip code" cell format in Excel. This will keep the leading zeros while still in the spreadsheet. (If you have more than 5 digits, you may need to alter this format ... but you get the idea.)

Then, on the Word side ... (these instructions assume your document is already created. If it has not been, then make the changes to the Options before creating it, and you're good to go.)

Open the Word doc you want to merge

Choose button at upper left corner, and pick "Word Options"

Click on "Advanced"

Scroll down to "General"

Check the box that says "Confirm file format conversion on open"

Choose "OK"

Now, link your merge document to some random spreadsheet (to break the connection to the old spreadsheet.)

Save document and re-open.

Answer yes, or OK to whatever questions to get back into the document.

Re-link it to the original spreadsheet. Choose "Excel spreadsheet" when it asks for confirmation of the type of document.

Merge.

Leading zeroes will be there.

Happy, happy me. (Since this year's offering envelopes start with "00". :)

Addendum: This only works for me if I open the spreadsheet manually prior to merging. However, I'm running Windows on a Mac inside Parallels, so this may be a Mac-related weirdness. But if you have trouble, try opening the spreadsheet before merging.

1 comment:

Clifford Jeffery said...

I thought this blog was written in English. My bad =)