Hello,
is there a way to keep the default signature associated with my gmail account when sending an email from Gmail through VBA (I am using CDO if that can be helpful).
Below is the bit of code relevant to the email configuration: everything works fine except for the missing signature.
Any idea? Thank you.
is there a way to keep the default signature associated with my gmail account when sending an email from Gmail through VBA (I am using CDO if that can be helpful).
Below is the bit of code relevant to the email configuration: everything works fine except for the missing signature.
Any idea? Thank you.
Code:
'Update the configuration fields Mail.Configuration.Fields.update
'Set All Email Properties
With Mail
.Subject = Sheets("Mail").Range("MailSubject")
.From = Application.Username
.To = "user1@gmail.com"
' .CC = "user2@gmail.com"
' .BCC = "user3@gmail.com"
.textbody = Sheets("Mail").Range("MailBody")
strLocation = Sheets("Mail").Range("AttachPath")
strFileName = Sheets("Mail").Range("AttachFileName")
strFileExt = Sheets("Mail").Range("AttachFileExt")
'
.AddAttachment strLocation & strFileName & strFileExt
End With
Mail.Send
MsgBox ("Mail has been Sent")
Last edited: