• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Help with VBA code

Status
Not open for further replies.

Rodney Coello

New Member
Hello, I'm trying to set up a code to send an email to a distribution list on my outlook contacts though an excel workbook. my contact group name is "CBO Finance Team". I set this code up it came up with errors. i don't want the code to necessarily send email but to say the same thing each time, so i wanted to set up a macro that I can send to contact group and say the same thing. what am I doing wrong? thank you!

Code:
Sub GL_Central_Texas()
Dim OlApp As Outlook.Application
Dim OlMail As Outlook.AddressList

Set OlApp = New Outlook.Application
Set OlMail = OlApp.CreateItem(olMailItem)

With OlMail
.To = "CBO Finance team"


.Subject = "Home Health & Hospice GL Support"
.Body = "Attached are the HCHB reports and the Horizon GL Excel file to support your uploads to your GL."
.Display
End With



End Sub
 
Last edited by a moderator:
Please use code tag when you post codes. I've edited it this time.

As well, in order for you to get help. You'll need to tell us, what error message comes up when you run the code and which line is highlighted when you go into debug mode.
 
Status
Not open for further replies.
Back
Top