Private Sub Estimation_Click()
Dim sRep As String
Dim sFilename As String
Dim Nom As String
Sheets(Array("Renseignements salarié", "Feuille Calcul Indemnités")).Select
sRep = ThisWorkbook.Path
sFilename = ThisWorkbook.Name
sFilename = Left(sFilename, InStr(1, sFilename, ".")) & "pdf"
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=sRep & sFilename, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
ActiveWorkbook.Name, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
False
Nom = Left(ActiveWorkbook.Name, InStrRev(ActiveWorkbook.Name, ".")) & "pdf"
Set olApp = CreateObject("Outlook.application")
Set m = olApp.CreateItem(0)
With m
.attachments.Add ActiveWorkbook.Path & "\" & Nom
.display
End With
End Sub