G
Guest
Hi all
Can the following code be changed to email to a list of users? Can a
distribution group be picked up from within Outlook contacts or would I have
to store the email addresses in an Access Table and concatenate them somehow?
Public Sub MailIt(strContactName As String, strFile As String)
Dim objOutLook As Outlook.Application
Dim objMail As Outlook.MailItem
Dim objContact As Outlook.Recipient
Set objOutLook = New Outlook.Application
Set objMail = objOutLook.CreateItem(olMailItem)
With objMail
.To = strContactName
.Subject = "RE: some subject line"
.Attachments.Add (strFile)
.Display
End With
Set objMail = Nothing
Set objOutLook = Nothing
End Sub
Thanks in advance for any help.
Sue
Can the following code be changed to email to a list of users? Can a
distribution group be picked up from within Outlook contacts or would I have
to store the email addresses in an Access Table and concatenate them somehow?
Public Sub MailIt(strContactName As String, strFile As String)
Dim objOutLook As Outlook.Application
Dim objMail As Outlook.MailItem
Dim objContact As Outlook.Recipient
Set objOutLook = New Outlook.Application
Set objMail = objOutLook.CreateItem(olMailItem)
With objMail
.To = strContactName
.Subject = "RE: some subject line"
.Attachments.Add (strFile)
.Display
End With
Set objMail = Nothing
Set objOutLook = Nothing
End Sub
Thanks in advance for any help.
Sue