Dans mon applic Excel, j'ai trouvé une procédure qui me permet d'envoyer un
classeur par e-mail. Mais je ne trouve pas le moyen pour l'envoyer avec
plusieurs documents en pièces jointes.
Private Sub EnvoiMail(strEMail)
Dim objOutlook As Object
Dim objOutlookMsg As Object
Dim objOutlookRecip As Object
Dim wbk As Workbook
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
.Recipients.Add strEMail
.Subject = "Test Sub"
.Body = "Body test" & vbCrLf & vbCrLf
.attachments.Add "LePremierClasseur.xls"
.Send
End With
'cleanup
Set objOutlook = Nothing
Set objOutlookMsg = Nothing
Set objOutlookRecip = Nothing
Set wbk = Nothing