Bonjour, voici mon code pour l'envoi d'un mail qui fonctionne très bien. (Send)
Seulement, ma macro quand je la remplace par display ne permet pas de voir le corps du texte.
Dim AWorksheet As Worksheet
Dim Sendrng As Range
Dim rng As Range
On Error GoTo StopMacro
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
'les cellules que l'on veut envoyer dans le mail
Set Sendrng = Worksheets("Mail").Range("A1:O41")
'la feuille active
Set AWorksheet = Worksheets("Mail")
With Sendrng
' selectionne la feuille avec la range que l'on veut envoyer
.Parent.Select
Set rng = ActiveCell
.Select
' Create the mail and send it
ActiveWorkbook.EnvelopeVisible = True
With .Parent.MailEnvelope
With .Item
'Pour en rajouter mettre un espace au debut et un point-virgule à la fin
.To = "
.CC = ""
.BCC = ""
.display
End With
End With
End With
'Activate the sheet that was active before you run the macro
AWorksheet.Select
StopMacro:
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
ActiveWorkbook.EnvelopeVisible = False
Merci à tous !