Results 1 to 1 of 1

NEED HELP with a macro that allows you to send email of selected rows

Threaded View

  1. #1
    Registered User
    Join Date
    05-21-2014
    Posts
    1

    Exclamation NEED HELP with a macro that allows you to send email of selected rows

    Excel Forumn Example.xlsmI'm currently working on a macro that will allow you to highlight columns and generate an email with only the information that was highlighted. Currently, I have it set up where all of my information is in a table which allows me to filter information if I need to, but I'm running into an issue when I attempt to send filtered information. For example, lets say I have rows 1-5. I filter my information and only rows 1,3, and 5 are shown when I highlight these rows and attempt to send them my code will still send all of the rows 1-5. Is there anyway to fix this? I have attached a blank copy of my excel spreadsheet with the macros attached. Any help would be greatly appreciated. MY code is also below.

    Sub Send_Selection_Or_ActiveSheet_with_MailEnvelope()
    'Working in Excel 2002-2013
    Dim Sendrng As Range

    On Error GoTo StopMacro

    With Application
    .ScreenUpdating = False
    .EnableEvents = False
    End With

    'Note: if the selection is one cell it will send the whole worksheet
    Set Sendrng = Selection

    'Create the mail and send it
    With Sendrng

    ActiveWorkbook.EnvelopeVisible = True
    With .Parent.MailEnvelope

    ' Set the optional introduction field thats adds
    ' some header text to the email body.
    .Introduction = "Good Morning,"

    With .Item
    .TO = ""
    .CC = "Jared.j@fakeemail.com"
    .BCC = ""
    .Subject = "forumn example"
    .display
    End With

    End With
    End With

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

    End Sub


    Any Help Would be greatly Appreciated.
    Last edited by Jester_Jay; 05-21-2014 at 02:57 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Send an email when a dropdown value is selected
    By lswindal in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-01-2014, 08:51 AM
  2. send selected range in email with default outlook email signature included
    By mdsickler in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-04-2013, 10:50 PM
  3. [SOLVED] Macro to send an email after filtering rows
    By Kimston in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-09-2012, 11:33 PM
  4. Macro to send an email of specific rows
    By humacdeep in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 10-10-2011, 10:41 AM
  5. Macro to send email to V lookup recipients for selected row
    By tandridge in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-23-2011, 08:44 AM

Tags for this Thread

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