Sub mailsend()
'Configuration des variables
Dim OL As Object, mail As Object, wDoc As Object, rng As Object
Dim title As String
Dim filedate As String
Set OL = CreateObject("Outlook.Application")
Set mail = OL.CreateItem(olMailItem)
Set wDoc = mail.GetInspector.WordEditor
'Configuration du mail
title = "Indicateurs Quotidiens"
filedate = ThisWorkbook.Sheets("CONFIG").Range("C2")
Sheets("RAPPORT").Activate
With mail
.To = Sheets("CONFIG").Range("$C$12").SpecialCells(xlCellTypeVisible).Value
'.To = "alaide@svp.com"
.CC = Sheets("CONFIG").Range("$C$15").SpecialCells(xlCellTypeVisible).Value
.BCC = Sheets("CONFIG").Range("$C$18").SpecialCells(xlCellTypeVisible).Value
.Subject = title & filedate
.BodyFormat = olFormatHTML
.Display
Range("A3:N14").Copy
Set rng = wDoc.Content
rng.Paste
' Insertion texte premier tableau
rng.InsertAfter "" & vbNewLine & "Commentaires" & vbCrLf
.Display
End With
Set OL = Nothing
Set mail = Nothing
Set wDoc = Nothing
End Sub