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

How to Send mail and CC to Multiple reiepents from excell automatically

vedamoorthy

New Member
Hi Sir,

I am Vedamoorthy, from Chennai.
I am very new to Excell Macros, VBA.

I have a macro running in my excell which sends email automatically.
But i am unable to send this mail automaticaly to Multiples reiepents and CC.
Kindly help me in developing this.

In column ''K"" I have mail adress of reciepent.
I wanted to address more eciepent/send to Group mail IDs, and copy this mail to multiple reciepents. when i try this this is stop responding and not function.

For example, if my cell contains single mail ID : vedamoorthy22[at]gmail[dot]com , This macro is sending mail automatically.
if i wish to add ore IDs seperated by '';" (e.g . vedamoorhy22[at]gmmail[dot]com; veda2005200[at]gail[dot]com) this macrostops running and i am unable to do this.
KIndly help on making this possible.

Thanks in advance...
I am sharing this codes below....

Code:
Sub Mail_with_outlook2()
'For mail code examples visit my mail page at:
'http://www.rondebruin.nl/sendmail.htm
    Dim OutApp As Outlook.Application
    Dim OutMail As Outlook.MailItem
    Dim strto As String, strcc As String, strbcc As String
    Dim strsub As String, strbody As String

    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(olMailItem)

    strto = Cells(FormulaCell.Row, "K").Value
    strcc = Cells(FormulaCell.Row, "L").Value
    strbcc = ""
    strsub = "Your subject"
    strbody = "Hi " & Cells(FormulaCell.Row, "A").Value & vbNewLine & vbNewLine & _
              vbNewLine & vbNewLine & "we are assinging this call to you : " & Cells(FormulaCell.Row, "B").Value & _
              vbNewLine & vbNewLine & "Your total of this week is : " & Cells(FormulaCell.Row, "B").Value & _
              vbNewLine & _
              vbNewLine & _
              vbNewLine & vbNewLine & "Thanks and Regards" & vbNewLine & _
              vbNewLine & "U.Vedamoorthy CCSC" & vbNewLine & _
              vbNewLine & "CCSC Chennai"

    With OutMail
        .To = strto
        .CC = strcc
        .BCC = strbcc
        .Subject = strsub
        .Body = strbody
        'You can add a file to the mail like this
        .Attachments.Add ("C:\Users\310119352\Desktop\Copy of 1311RB Table.xlsx")
        .SendUsingAccount = OutApp.Session.Accounts.Item(2)
        .Send  ' or use .Send
    End With

    Set OutMail = Nothing
    Set OutApp = Nothing
End Sub
 
Last edited by a moderator:
Back
Top