• 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.

Sending mail via outlook

Veeru106

Member
Hi, I am trying to send automatic mail via Vba code.

Code I have is working fine except I am not able to add more than 20 names in CC.

Please help. Below is the code
Code:
Sub attachment()
Dim strlocation As String
Dim outapp As Object
Dim outmail As Object
Set outapp = CreateObject("outlook.application")
Set outmail = outapp.createitem(0)
strlocation = "C:\Users\ah0118261\Desktop\Goals 2016-FPM Team.pptx"
With outmail
.To = ""
.CC = ""
.BCC = ""
.Subject = "Training Structure"
.Body = "Please write your content"
.Attachments.Add (strlocation)
.display
End With
Set outmail = Nothing
Set outapp = Nothing
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
End Sub
 
Last edited by a moderator:
Back
Top