Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Access-Word Automation (-2147023174 Automation Error)
Message
De
11/11/1998 10:31:24
 
 
À
Tous
Information générale
Forum:
Microsoft Office
Catégorie:
Access
Titre:
Access-Word Automation (-2147023174 Automation Error)
Divers
Thread ID:
00156589
Message ID:
00156589
Vues:
59
Hi all !

Here my problem : I have a Access database and a form. On the form, I have a button. When I click this button I take active this code.
(Mail Merge Process). When I execute the first time this code everything go right the user close the word application after but the problem appear when i try to execute a second time. The wordtest is created successful but mymerge give this error.

Here the code :

Dim mymerge As word.MailMerge
Dim wordTest As Object

Set wordTest = CreateObject("word.basic")

With wordTest
.fileopen StrFileName
.appmaximize
Set mymerge = ActiveDocument.MailMerge
mymerge.Execute
End With

Set mymerge = Nothing
Set wordTest = Nothing

End If

Thank to all
Répondre
Fil
Voir

Click here to load this message in the networking platform