voila mon code
le compilateur me revoie l'erreur " Variable objet ou variable de bloc with non définie " pour la ligne marquée d'une "*".
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 Private Sub Commande40_Click() Dim oWord As Word.Application Dim Text As String Set oWord = New Word.Application * oWord.Visible = False oWord.Selection.TypeText Text:="ceci est un test" oWord.ActiveDocument.SaveAs "C:\Documents and Settings\Administrateur\Bureau\essai_creation_doc_word.doc" On Error GoTo Err_Commande40_Click DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70 Exit_Commande40_Click: Exit Sub Err_Commande40_Click: MsgBox Err.Description Resume Exit_Commande40_Click End Sub
comment puis-je faire pour arriver à générer ce doc word.
Merci d'avance.
Partager