Link to home
Start Free TrialLog in
Avatar of ramramcat
ramramcatFlag for United States of America

asked on

MS Word 2010 mail merge loses data source

I have a DOCX with mail merge fields set up and a CSV file for the data source. If I complete the merge and save the main document, when I re-open the main document I get an error message saying that (an unknown docx filename) is a mailmerge main document. Word cannot find it's data source (correct CSV filename).
The CSV file stated in the error message exists in the path stated in the error message. I know that if running manually, I can disconnect then reconnect the data source and go on, however, this document needs to be processed from within a Visual Foxpro program using OLE automation. Unfortunately, if I attempt to process the document from within the program I get the same message about Word cannot find the data source.
I need to get this working as soon as possible using Word 2010 and Office 365. Worthy of mention is that I have many Visual Foxpro programs that successfully automated Word mail merge when we were using Word 2003.
Thanks in advance.
Cathie
NYC
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Does this happen with one document only?

It sounds as it might be corrupt. Have you tried rebuilding it from scratch.

Why do you save it after the merge? If it is already set up, then the actual merge process shouldn't change it.

If you are running  under programmatic control, could you show the code please? Personally I have hardly used Foxpro since DOS, but I do know that it is similar enough to VB for VB users to comprehend.
Avatar of ramramcat

ASKER

The error is happening with 3 different mail merge documents.
They all were set up by my client originally with different data sources. I changed the document to a "normal word document", saved it, then re-opened (without error), and added the new data source and fields. Upon re-opening the documnet I got the error message.
Since that didn't work I created an entirely new document, copied in the text and added the data source and fields. If I save and close the document, then attempt to re-open it the error message appears.
The above all happens while using Word 2010 directly not under programmatic control. I mentioned programmatic control because eventually these documents will be processed under programmatic control but right now they don't even work using Word directly.
Thanks for your help.
ASKER CERTIFIED SOLUTION
Avatar of ramramcat
ramramcat
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Resolved issue independently.