Sub SendWithAtt()
' Nécessite la référence : Microsoft Outlook 1x Object Library
Dim olApp As Outlook.Application
Dim olMail As MailItem
Dim CurFile As String
Set olApp = New Outlook.Application
Set olMail = olApp.CreateItem(olMailItem)
' "\\CHEMIN DU DOCUMENT"
CurFile = ThisWorkbook.Path & "\" & "blablabla" & " " & Range("Feuil6!F2") & " " & "blablabla.pdf"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=CurFile, _
Quality:=xlQualityStandard, IncludeDocProperties:=False, IgnorePrintAreas:=False, _
OpenAfterPublish:=False
With olMail
BodyFormat = olFormatHTML
.Display
.To = Range("Feuil6!T2")
.CC =
.Subject =
.HTMLBody = "Bonjour,"
'.Attachments.Add "\\CHEMIN DU DOCUMENT"
.Display '.Send
End With
MsgBox "Merci de vérifier que le message apparait dans -messages envoyés- dans votre messagerie OUTLOOK."
' Effacer les variables objets
Set olMail = Nothing
Set olApp = Nothing
End Sub