I am building an Excel add-in that sends the active workbook as an attachment in an Outlook email template to a specific Contact Group.
I\'ve gotten the first two pa
In order to have the recipient's email addresses or names resolved (so they don't display just plain text), you can do the following.
With OutMail
'.TO field should be set to the contact group
.BCC = ""
.Attachments.Add ActiveWorkbook.FullName
.HTMLBody = Replace(OutMail.HTMLBody, strOldPeriod, strNewPeriod)
.Subject = Replace(OutMail.Subject, strOldPeriod, strNewPeriod)
'To display the email leave as is; to send the Email, change to .Send
.Display 'or Send
If Not .Recipients.ResolveAll Then
For Each Recipient In .Recipients
If Not Recipient.Resolved Then
MsgBox Recipient.Name & " could not be resolved"
End If
Next
End If
End With