Bonjour à tous,
Actuellement je cherche à pouvoir mettre en forme un mail au format HTML, bizarrement je n'arrive à le faire malgré plusieurs essai et une recherche sur le net qui retrace ce que j'ai fais en gros dans mon code.
Pouvez vous m'éclaircir svp ?
PrivateSub btnConfirmationRV_Click()
Dim olApp As Outlook.Application
Dim objNewMail As Outlook.MailItem
Dim var AsVariant
Dim ObjAdoClient As ADODB.Recordset
Dim Sql AsString
Dim Adresse AsString
Set olApp = New Outlook.Application
Set objNewMail = olApp.CreateItem(olMailItem)
Call FrmSAV.vaSpread1.GetText(1, vaSpread1.ActiveRow, var)
Sql = "SELECT MainAddress1 FROM T_Customer WHERE ClientName ='" & var & "'"
Set ObjAdoClient = ObjAdoMain.Execute(Sql)
WhileNot ObjAdoClient.EOF
Adresse = ObjAdoClient!MainAddress1
ObjAdoClient.MoveNext
Wend
ObjAdoClient.Close
objNewMail.BodyFormat = olFormatHTML
objNewMail.Subject = "Confirmation de Rendez-vous"
objNewMail.body = "<html><head><H3>CONFIRMATION DE RENDEZ-VOUS</H3></head>" & vbCrLf & " " & vbCrLf & " " & vbCrLf & "" & _
"<body><b>Client :</b> " & var & vbCrLf & _
"" & vbCrLf & _
"Contact : " & vbCrLf & vbCrLf & vbCrLf & _
"Date(s) Intervention(s) : " & vbCrLf & _
"Heure(s) Intervention(s) : " & vbCrLf & vbCrLf & vbCrLf & _
"Chargé(e) de planification : " & FrmPpl.StatusBar1.Panels(2) & vbCrLf & vbCrLf & _
"Commentaires :" & vbCrLf & _
"Si F.I. type - Installation initiale : " & vbCrLf & vbCrLf & _
"Si F.I. type - Autres : " & vbCrLf & vbCrLf & _
"Adresse d'intervention : " & Adresse & _
"" & FrmFicheSAV.Text1(2).Text & vbCrLf & vbCrLf & _
"Cordialement," & vbCrLf & vbCrLf & _
FrmPpl.StatusBar1.Panels(2).Text & "</head></html>"
objNewMail.display
'objNewMail.send
EndSub
Merci par avance !
_______________________
<<<< :-: 4L!@$ :-: >>>>