Caroline,
I made the following changes and I still cannot attach the DataSource.
Any other suggestions.
From WORD XP
Sub OpenDataSource(Name As String, [Format], [ConfirmConversions], [ReadOnly], [LinkToSource], [AddToRecentFiles], [PasswordDocument], [PasswordTemplate], [Revert], [WritePasswordDocument], [WritePasswordTemplate], [Connection], [SQLStatement], [SQLStatement1], [OpenExclusive], [SubType])
llOpenExclusive = .F.
#Define wdMergeSubTpeWord2000 8
oWord.ActiveDocument.MailMerge.OpenDataSource(;
lcName,;
lnwdOpenFormatAuto,;
lnConfirmConversions,;
lnReadOnly,;
lnLinkToSource,;
lnAddToRecentFiles,;
lcPasswordDocument,;
lcPasswordTemplate,;
lnRevert,;
lcWritePasswordDocument,;
lcWritePasswordTemplate,;
lcConnection,;
lcSQLStatement,;
lcSQLStatement1,;
llOpenExclusive,;
wdMergeSubTpeWord2000)
Lee,
You need to change the OpenDataSource to use the old Word200 method.
#define wdMergeSubTypeWord2000 8
oWord.ActiveDocument.MailMerge.OpenDataSource(;
lcName,;
lnwdOpenFormatAuto,;
lnConfirmConversions,;
lnReadOnly,;
lnLinkToSource,;
lnAddToRecentFiles,;
lcPasswordDocument,;
lcPasswordTemplate,;
lnRevert,;
lcWritePasswordDocument,;
lcWritePasswordTemplate,;
lcConnection,;
lcSQLStatement,;
lcSQLStatement1,;
wdMergeSubTypeWord2000)
HTH
>I am having trouble attaching a datasource to Word XP for Mailmerge.
>The code below works fine for VFP 6 & 7 and Word 97 & 2000.
>It just will not work with Word XP.
>
>The Macro Recorder creates an OCD (Office Connection Document) and uses this instead of a VFP Table.
>
>I have reviewed all books & UT. I can usually find something on UT to solve my problem.
>Is anyone else having problems w/ MailMerge in Word XP???
>
>
>
>