Thanks Lalit On Thu, Jun 28, 2012 at 3:51 PM, Lalit_Mohan <mohan.pande...@gmail.com>wrote:
> > Hi Hemanath > > Hope it helps you > > 'First add Tool -> Refrence -> Microsoft Outlook 12.0 object library > Sub ExportEmail() > Dim olApp As Object > Dim olMail As Object > Dim olNs As Object > Dim strSub As String > Dim strEmailTo As String > Dim strEmailCC As String > Dim strEmailBCC As String > Dim strDistroList As String > Dim rngRange As Range > Dim rngCell As Range > > Application.ScreenUpdating = False > Application.DisplayAlerts = False > Application.StatusBar = "Creating Email and sending..." > > Set rngRange = ActiveSheet.UsedRange > > For Each rngCell In rngRange.Resize(, 1).Offset(1) > strEmailTo = Trim(rngCell.Offset(, 2).Value) > strEmailCC = "" > strEmailBCC = "" > strSub = Trim(rngCell.Offset(, 1).Value) > Set olApp = CreateObject("Outlook.Application") > Set olNs = olApp.GetNamespace("MAPI") > olNs.Logon > Set olMail = olApp.CreateItem(olMailItem) > olMail.to = strEmailTo > olMail.CC = strEmailCC > olMail.BCC = strEmailBCC > olMail.Subject = strSub > olMail.Body = "" > olMail.Display > olMail.Send > Next rngCell > > Application.StatusBar = False > Application.ScreenUpdating = True > Application.DisplayAlerts = True > > > End Sub > > > > Regards, > Lalit Mohan > > -- > FORUM RULES (986+ members already BANNED for violation) > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > > 2) Don't post a question in the thread of another member. > > 3) Don't post questions regarding breaking or bypassing any security > measure. > > 4) Acknowledge the responses you receive, good or bad. > > 5) Cross-promotion of, or links to, forums competitive to this forum in > signatures are prohibited. > > NOTE : Don't ever post personal or confidential data in a workbook. Forum > owners and members are not responsible for any loss. > > > ------------------------------------------------------------------------------------------------------ > To post to this group, send email to excel-macros@googlegroups.com > > To unsubscribe, send a blank email to > excel-macros+unsubscr...@googlegroups.com -- Thanks HemanatH -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com