Sub EnvoiPdfPJ_2007()
Dim CdoMessage As Object
Dim sFichier As String
sFichier = ThisWorkbook.Path & "\" & "MultiPdf.pdf"
Application.ScreenUpdating = False
ThisWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:=sFichier, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
Set CdoMessage = CreateObject("CDO.Message")
With CdoMessage
.Subject = "Exemple"
.From = "aaaaa@wanadoo.fr"
.To = "bbbbb@orange.fr"
.CC = ""
.BCC = ""
.TextBody = "Texte dans le corps de message"
.AddAttachment sFichier
.Send
End With
Set CdoMessage = Nothing
Kill sFichier
Application.ScreenUpdating = True
End Sub
Sheets(Array("Feuil1", "Feuil3")).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=sFichier, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False