Word Mail Merge Issue

S

Scott McBurney

One of our customers has come across an interesting issue in Word (2003 and
older versions).

We have an application that performs a mail merge programmatically using
Word's object model. The mail merge uses a CSV file as the data source, and
our application performs the merge using an ODBC Data Source defined using
the MS Text driver. It works well. However, it appears to alwasy remove
blank lines from multi line fields in the merge.

On the other hand, if we try a modified version of the code to perform the
merge using Word's built in text driver, blank lines are left as-is in
multi-line fields.

This is causing some problems for one of our customers. Why is there such
an inconsistency between the two methods of merging data? Is there any way
to get consistent behavior between the two methods?

Any help here would be greatly appreciated.
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?U2NvdHQgTWNCdXJuZXk=?=,
One of our customers has come across an interesting issue in Word (2003 and
older versions).
Well, I'd have to see a concrete example of the blank lines stuff, but...

There's an option in Word to explicitly allow/stop hiding blank lines during
merge. In Word 2002/2003 it's only accessible by pulling the old Mail Merge...
command out of Tools/Customize/Commands, All Commands.

In the automation interface:
ActiveDocument.MailMerge.SuppressBlankLines = True 'False
We have an application that performs a mail merge programmatically using
Word's object model. The mail merge uses a CSV file as the data source, and
our application performs the merge using an ODBC Data Source defined using
the MS Text driver. It works well. However, it appears to alwasy remove
blank lines from multi line fields in the merge.

On the other hand, if we try a modified version of the code to perform the
merge using Word's built in text driver, blank lines are left as-is in
multi-line fields.

This is causing some problems for one of our customers. Why is there such
an inconsistency between the two methods of merging data? Is there any way
to get consistent behavior between the two methods?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top