Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / December 2003

Tip: Looking for answers? Try searching our database.

Word Merge throws exception

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David Carey - 10 Dec 2003 14:59 GMT
Hi

I'm running a C++ app that uses Word automation to merge
data into a Word template. In the past this app has always
worked OK, but now calling the MailMerge::Execute method
results in a COleDispatchException being thrown and the
following message is popped up: "Word could not finish
merging these documents or inserting this database".

I believe this is the first time I've tried to run this
app with Word 2002 as opposed to Word 2000.

Any assistance would be much appreciated.

Dave Carey
Peter Jamieson - 10 Dec 2003 15:52 GMT
The problem is probably as follows.

If you are also establishing the connection to the data source in your C++
code (and possibly even if you are not) and you were using ODBC to connect,
you will need an extra parameter in the OpenDataSource call - in VBA it
would be

Subtype=wdMergeSubtypeWord2000

The Subtype parameter does not exist in Word 2000 or earlier. The
wdMergeSubtypeWord2000 value makes Word use (roughly) the same approach to
opening data sources as it did in Word 2000.

--
Peter Jamieson - Word MVP

> Hi
>
[quoted text clipped - 11 lines]
>
> Dave Carey
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.