Sending email to distribution list/group via VBA for Outlook

hopsy24

New member
Local time
Yesterday, 22:33
Joined
Mar 9, 2015
Messages
3
Below is the code that i'm going to be using to send info to all our clients. When I have a few email address in the recipients.add part, the email shows all the addresses. Now I have a group of 100 addresses and the email appears at the end of the code with the word bids in the bcc, not the group. How do I get the group to appear instead of just the word? I've tried taking the quotes away from the word bids, but that gives me an error.
Thanks in advance.

Code:
Public Function emailbids()
Dim oOutlook As Outlook.Application
Dim oEmailItem As MailItem

On Error Resume Next
Set oOutlook = GetObject(, "Outlook.Application")
If oOutlook Is Nothing Then Set oOutlook = CreateObject("Outlook.Application")

Set oEmailItem = oOutlook.CreateItem(olMailItem)

With oEmailItem
.HTMLBody = "This is only a test."
.recipients.Add("bids").Type = 3
.Subject = "subject goes here"
'.Send 'if you want to send it directly without displaying on screen
.Display
End With

Set oEmailItem = Nothing
Set oOutlook = Nothing
End Function
 

Users who are viewing this thread

Back
Top Bottom