Bonjour le forum !
J'ai un soucis au niveau de mon code je n'arrive pas à inserer une signature a la fin de mon mail... Quelqu'un connait le code ? je ne trouve rien sur la signature d'un mail.
Private Sub CommandButton1_Click()
Dim OutApp As Object, OutMail As Object, Fichier$
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
ActiveSheet.Copy
Fichier = ThisWorkbook.Path & "\" & ActiveSheet.Name & ".xlsx"
ActiveWorkbook.SaveCopyAs Fichier
On Error Resume Next
With OutMail
.to = "ordaz75@lol.com"
.Subject = "Tableau"
.Body = "Bonjour"
.Attachments.Add Fichier
.Display 'pour voir et modifier ou envoyer
'.Send 'Pour envoyer directement
End With
On Error GoTo 0
ActiveWorkbook.Close 0
Kill Fichier
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Merci d'avance
J'ai un soucis au niveau de mon code je n'arrive pas à inserer une signature a la fin de mon mail... Quelqu'un connait le code ? je ne trouve rien sur la signature d'un mail.
Private Sub CommandButton1_Click()
Dim OutApp As Object, OutMail As Object, Fichier$
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
ActiveSheet.Copy
Fichier = ThisWorkbook.Path & "\" & ActiveSheet.Name & ".xlsx"
ActiveWorkbook.SaveCopyAs Fichier
On Error Resume Next
With OutMail
.to = "ordaz75@lol.com"
.Subject = "Tableau"
.Body = "Bonjour"
.Attachments.Add Fichier
.Display 'pour voir et modifier ou envoyer
'.Send 'Pour envoyer directement
End With
On Error GoTo 0
ActiveWorkbook.Close 0
Kill Fichier
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Merci d'avance