My aim is to generate a mail.
The code does work, except for the attachment. "File settimanale"
is a variant containing the path of the ppt
I want to attach.
Has someone a solution?
'First, select the body format as olFormatHtml.
.BodyFormat = olFormatHTML
'Now display the email.
.Display
'write the email in the body of the email
.HTMLBody = "Buongiorno Giacomo, " & "<br>" & "<br>" & "Invio in allegato il monitoraggio settimanale di Neafidi al " & DataCons & "<br>" & "<br>" & "Grazie e buon proseguimento," & .HTMLBody
'Invio la mail al seguente indirizzo
.To = MailInvio
.CC = MailInvioCC
'Inserisco oggetto della mail
.Subject = SoggettoMail
'Inserisco allegato nella mail
.Attachment = FileSettimanale
End With