+ Reply to Thread
Results 1 to 3 of 3

Send email via outlook

  1. #1
    Forum Contributor
    Join Date
    01-21-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    227

    Send email via outlook

    Hey all,

    I'm new to excel and stuff. Just started learning on my own.

    I know there a quite a few posts on this but I'm really a noob.

    Need help in creating macro or any script that will send the data that is in the excel via an Microsoft outlook2010 email.

    Basically, I copy all this manually in an email and send it. It takes a bit time.

    I have to send this "To" a corporate DL and "CC" to another DL.

    Can you please help me with that.

    PS: I have no knowledge about macros and stuff. Just started learning recording and running simple macros.

    Thanks!
    Attached Files Attached Files
    Last edited by sakmsb; 01-28-2013 at 03:25 AM. Reason: Corrected thread title to topic only, as per forum rules

  2. #2
    Forum Contributor
    Join Date
    01-21-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    227

    Re: Send email via outlook

    after researching a lot, i was able to find and modify this a bit:

    Sub Send_Range_Or_Whole_Worksheet_with_MailEnvelope()
    Dim AWorksheet As Worksheet
    Dim Sendrng As Range
    Dim rng As Range

    On Error GoTo StopMacro

    With Application
    .ScreenUpdating = True
    .EnableEvents = True
    End With

    'Fill in the Worksheet/range you want to mail
    'Note: if you use one cell it will send the whole worksheet
    Set Sendrng = Worksheets("Improvement")

    'Remember the activesheet
    Set AWorksheet = ActiveSheet

    'Create the mail and send it
    With Sendrng

    ' Select the worksheet with the range you want to send
    .Parent.Select

    'Remember the ActiveCell on that worksheet
    Set rng = ActiveCell

    'Select the range you want to mail
    .Select

    ' Create the mail and send it
    ActiveWorkbook.EnvelopeVisible = True
    With .Parent.MailEnvelope

    ' Set the optional introduction field thats adds
    ' some header text to the email body.
    .Introduction = "Improvement details"

    ' In the "With .Item" part you can add more options
    ' See the tips on this Outlook example page.
    ' http://www.rondebruin.nl/mail/tips2.htm
    With .Item
    .To = "[email protected];[email protected]"
    .Subject = "Improvement Details Test"
    End With

    End With

    'select the original ActiveCell
    rng.Select
    End With

    'Activate the sheet that was active before you run the macro
    AWorksheet.Select

    StopMacro:
    With Application
    .ScreenUpdating = True
    .EnableEvents = True
    End With
    ActiveWorkbook.EnvelopeVisible = True

    End Sub

  3. #3
    Forum Contributor
    Join Date
    01-21-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    227

    Re: Send email via outlook

    a few changes that i would want are:

    add CC
    enter extra text
    include 2days ago date

    Can some1 plz help me with this?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1