Frank,
It would work in some versions but not under all (that's one reason I dropped supporting MailMerge class in downloads).
If your problem is memo fields then you might use ADO or write a table on a word doc row by row but do not use VFP or Fox2x as datasource I suggest (if you still want to send to excel and use that one as datasource, or access etc - whatever office component you wish). However keep it in mind that this my personal suggestion and someone might say it works. I've never seen a working code. Exact same code works in word97 but not under word9, modify code and starts to work, try under word10 and bummer, it fails again. I was frustrated with the behavior it's affected nearly with each version of MDAC and word. My 100% working solution was nonODBC ones (a document with a table on it is a datasource for merging).
Cetin
>Hi Cetin,
>
>I can't use a text delimited file as there are memo fields involved (I did use that initially and cut the memo field to 250 characters but the user wasn't happy).
>
>What I've been doing is copying to foxplus type and trying to use that. Will that not work either?
>
>>>Hi,
>>>
>>>I need some help translating some VBA to open a Foxplus type datasource for a mail merge in WOrd. Here's the code from the macro I recorded:
>>>
>>> ActiveDocument.MailMerge.OpenDataSource Name:= _
>>> "C:\Development\VFP8\SigmaSoft\DMSys 5.0\test.DBF", ConfirmConversions:= _
>>> False, ReadOnly:=False, LinkToSource:=True, AddToRecentFiles:=False, _
>>> PasswordDocument:="", PasswordTemplate:="", WritePasswordDocument:="", _
>>> WritePasswordTemplate:="", Revert:=False, Format:=wdOpenFormatAuto, _
>>> Connection:= _
>>> "Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=C:\Development\VFP8\SigmaSoft\DMSys 5.0;Mode=Read;Extended Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=18" _
>>> , SQLStatement:="SELECT * FROM `test`", SQLStatement1:="", SubType:= _
>>> wdMergeSubTypeAccess
>>>
>>>Can anyone help me sort this out?
>>>
>>>Thanks,
>>>
>>>Frank.
>>
>>Frank,
>>If the source is a foxpro table forget about OpenDataSource(). Instead you might copy to a tab delimited text file and use it as a source.
>>Cetin