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
Dim MesDocs As String
Dim WshShell As Object
'Set olApp = New Outlook.Application
'Set olMail = olApp.CreateItem(olMailItem)
Set WshShell = CreateObject("WScript.Shell")
MesDocs = WshShell.SpecialFolders("MyDocuments")
CurFile = MesDocs & "\Professionnel\Jacques Pro\SOBRAQUES\TABLEURS SOBRAQUES 2015\PDF Interventions Béziers\"
CurFile = CurFile & Range("N10").Value & ".pdf"
msgbox curfile
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=CurFile, _
Quality:=xlQualityStandard, IncludeDocProperties:=False, IgnorePrintAreas:=False, _
OpenAfterPublish:=False
With olMail
.To = "nomprénom@domainel.fr;nom.prénom@domaine.com"
.CC = ""
.Subject = "Demande d'Intervention SOBRAQUES BEZIERS"
.Body = "Vous trouverez ci-joint notre demande d'Intervention"
.Attachments.Add CurFile
'.Attachments.Add "c:\My Documents\book.doc"
.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