jeremygannon
03-03-04, 04:16 PM
I have some code in outlook that creates a new email and attaches a file. I would like the macro to add a distribution list to the BCC: section and if possible to send it once the message is created. Below is the code I have so far:
Sub Test()
Set newMsg = Application.CreateItem(0)
newMsg.Subject = "AAA Rates " & Date
newMsg.Display
(the next line works for one person, but I have multiple distribution lists in Contacts)
newMsg.Recipients.Add ("jeremy.gannon@rbc.com")
Set myAttachments = newMsg.Attachments
myAttachments.Add "N:\Rates\Ratesheets\AAA-RS.pdf", olByValue, 1, "AAA Rates"
End Sub
Sub Test()
Set newMsg = Application.CreateItem(0)
newMsg.Subject = "AAA Rates " & Date
newMsg.Display
(the next line works for one person, but I have multiple distribution lists in Contacts)
newMsg.Recipients.Add ("jeremy.gannon@rbc.com")
Set myAttachments = newMsg.Attachments
myAttachments.Add "N:\Rates\Ratesheets\AAA-RS.pdf", olByValue, 1, "AAA Rates"
End Sub