HI Experts...
This is my first post in excel forum,
I am new to VBA coding.
I am unable to send to e-mail automatically when my cell contains Group Mail IDs, or multiple mail IDs separated by ";"
Kindly help me in solving this..
Thanks In Advance .....
Regards Vedamoothy .
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
Thanks in advance ............
Bookmarks