Hi,

I have a Visual FoxPro(VFP) application that has been doing mail merges into Word using the VFP ODBC driver and a VFP table.

After some of my clients have upgraded to Windows 10 and Word 2010 that merge no longer works. My investigation would appear to indicate that the ODBC driver is no longer recognized by Win 10|Word 2010.

So I thought I'd try to use an Excel file (xls) and use that for the merge.

Everything works except when I run this code
Code:
oDocument.MailMerge.OpenDataSource( cResultFile, ;		&& 01 - Name - Data Source File Name
				    0, ;				&& 02 - Format - wdOpenFormat
				    .F.,;				&& 03 - ConfirmConversions - Display Convert File Dialog Box
				    .F.,;				&& 04 - ReadOnly				
                                    ,;					&& 05 - LinkToSource - Perform Query Specified by Connection & SQL Statement Each Time
                                    .F.,;				&& 06 - AddToRecentFiles - Add File Name to the List of Recently Used Files in File Menu
                                    ,;					&& 07 - PasswordDocument - Password Used to Open the Data Source
                                    ,;					&& 08 - PasswordTemplate - Password used to Open the Template
                                    ,;					&& 09 - Revert - Controls what happens if Name is the file name of an Open Document
                                    ,;					&& 10 - WritePasswordDocument - Password used to save changes to the document
                                    ,;					&& 11 - WritePasswordTemplate - Password used to save changes to the template
                                    ,;					&& 12 - Connection - A Range within which the Query Specified by SQLStatement is to be performed
                                    ,;					&& 13 - SQLStatement - Defines Query options for retrieving data
                                    , ;					&& 14 - SQLStatement1 - Used if the query string is longer than 255 characters
                                    ,;					&& 15 - OpenExclusive - .T. to open exclusively
                                    )					&& 16 - SubType -
I get a dialog asking me to select a Table, which is actually the name of the Worksheet in the XLS file and there isn't any other Table or Range in the file.

If I click on OK, the merge goes through as designed.

I've uploaded the message as shown below.

VFP_to_Word_Merge_Select_Table_Dialog.jpg

Any help will be greatly appreciated, my clients are not too happy ...