voici mon probleme , je souhaite envoyer un mail outlook avec access sur le clik d'un bouton mais lerreur " echec d'excution" s'affcihe a cette ligne :
Set EMail = olApp.CreateItem(olMailItem)
voici mon code :
Private Sub envoyer_Click()
Dim olApp As Outlook.Application
Dim EMail As Outlook.mailItem
Set olApp = New Outlook.Application
' On affiche le contenu du champs NomPrenom et EMail :
Set EMail = olApp.CreateItem(olMailItem)
Set myAttachments = EMail.Attachments
With EMail
.To = "moi@mail.com"
.Subject = "Ma société"
.Body = "Ceci est un test. Ne pas répondre à ce message."
.Display
.Send
End With
End Sub
merci pour vos reponse !!
imène