Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word 2002 Mailmerge w/Excel Exception Error
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Word 2002 Mailmerge w/Excel Exception Error
Divers
Thread ID:
00951050
Message ID:
00951050
Vues:
45
Hi. I have a program that opens word via automation and merge data from an Excel file. ODBC Connection information is stored in the document. When I run the oDocument.MailMerge.Execute() command, Word generate an exception error: ...document is not a mail merge main document. If I open the same document directly from Word 2002 a popup message shows up asking me if I want to run the sql statement for the mail merge. If answer 'yes' document opens fine.
What could be the problem with the automation?

Word: 2002
OS: XP Pro
RELEASE ALL LIKE o*
LOCAL oDocument
PUBLIC oWord
oWord = CreateObject("Word.Application")
oWord.Visible = .t.
oDocument = oWord.Documents.Open("MailMerge.doc")
oDocument.MailMerge.Execute()
Répondre
Fil
Voir

Click here to load this message in the networking platform