Word 2007 merge field doesn't pick up formating of XL source

User avatar
stuck
Panoramic Lounger
Posts: 8176
Joined: 25 Jan 2010, 09:09
Location: retirement

Word 2007 merge field doesn't pick up formating of XL source

Post by stuck »

I have an XL 2000 workbook that formats a column to a custom format of 000, so that it displays leading zero's.

When I use this work book as a mail-merge data source and make the mail merge link using Word 2000, Word displays the custom formatted numbers with the leading zeros :joy:

When I use Word 2007, the leading zeros don't appear :sad:

Any clues, hints 'n' tips as to how to make Word 2007 behave they way I was expecting (i.e. same as Word 2000) gratefully received.

Ken

User avatar
HansV
Administrator
Posts: 78474
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Word 2007 merge field doesn't pick up formating of XL source

Post by HansV »

Word 2002 and later by default use OLE DB to connect to a mailmerge data source, and this method ignores formatting set in the source program.
You can either specify the formatting in Word, or use DDE instead of OLE DB to connect to the data source. See this post for the details.
Best wishes,
Hans

User avatar
stuck
Panoramic Lounger
Posts: 8176
Joined: 25 Jan 2010, 09:09
Location: retirement

Re: Word 2007 merge field doesn't pick up formating of XL source

Post by stuck »

Given that I have a mix of Word 2000 & 2007 I think the second option to pointed me to, to use DDE, will be the one for me but I'll check out both when I get back to work tomorrow.

Thanks,

Ken