Salut le forum
Avec votre soutien habituel, j'aimerai savoir l'emplacement idéal pour mon code ci-dessous (MODULE ou dans THISWORKBOOK):
Sub Mail_Workbook1()
' Works in Excel 2000, Excel 2002, Excel 2003, Excel 2007, Excel 2010, Outlook 2000, Outlook 2002, Outlook 2003, Outlook 2007, Outlook 2010.
' This example sends the last saved version of the Activeworkbook object .
Dim OutApp As Object
Dim OutMail As Object
Dim texte As String
Dim I As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
I = Range("B29").Value
texte = texte & Range("B39").Value & " le, " & Range("E17").Value & vbCrLf & vbCrLf
texte = texte & "A" & vbCrLf
On Error Resume Next
With OutMail
.To = Range("b29").Value
.CC = ""
.BCC = ""
.Subject = ""
.Body = texte
' You can add other files by uncommenting the following line.
' In place of the following statement, you can use ".Display" to
' display the mail.
.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Bonne compréhension