Sub Mail()
Dim Derli%, Dercol%
Dim StartOutlook As New Outlook.Application
Set StartOutlook = New Outlook.Application
With Sheets("Data")
Application.ScreenUpdating = False
Derli = .Range("A1").SpecialCells(xlCellTypeLastCell).Row
Dercol = .Range("A1").SpecialCells(xlCellTypeLastCell).Column
.Cells(2, 1).Resize(Derli + 1, Dercol).Copy
End With
Sheets.Add After:=Sheets("Data")
ActiveSheet.Name = "Temp"
Sheets("Temp").Cells(1, 1).Select
Selection.PasteSpecial Paste:=xlPasteAll ' , Transpose:=True
Selection.EntireColumn.AutoFit
ActiveWorkbook.EnvelopeVisible = True
With Sheets("Temp").MailEnvelope
.Introduction = "Bonjour," & Chr(13) & _
"Veuillez trouver ci-dessous la liste des erreurs trouvées à corriger." _
& Chr(13) & Chr(13) & "Cordialement."
.Item.To = "adresse@adresse.fr"
.Item.Subject = "Liste des erreurs trouvées"
'.Item.Send
End With
'ActiveWorkbook.EnvelopeVisible = False
'Application.DisplayAlerts = False
'Sheets("Temp").Delete
'Sheets("Data").Activate
'Cells(1, 1).Select
'Application.ScreenUpdating = True
'Application.DisplayAlerts = True
' Application.CutCopyMode = False
End Sub