1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
Sub EnvoiDemande()
If Sheets("Demande").Range("c1") <> "Modèle" Then
Dim MonOutlook, MonMessage As Object
Dim Corps As String Set MonOutlook = CreateObject("Outlook.Application") Set MonMessage = MonOutlook.createitem(0)
Corps = "Bonjour," & Chr(13) & Chr(10)
Corps = Corps & "Voici une nouvelle demande." & Chr(13) & Chr(10)
MonMessage.to = "toto@toto.com
MonMessage.Subject = "toto" MonMessage.body = Corps
MonMessage.Send
MsgBox "Demande envoyée"
Set Raccourci = Nothing
Set MonOutlook = Nothing
Else
MsgBox ("Veuillez tout d'abord enregistrer le fichier svp. Merci !")
End If
End Sub |
Partager