+ Reply to Thread
Results 1 to 8 of 8

Create macro to send worksheet as body of email using cells as subject line

  1. #1
    Registered User
    Join Date
    08-03-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003
    Posts
    15

    Create macro to send worksheet as body of email using cells as subject line

    Hi,

    I would like to send the data in a worksheet as the body of an email to outlook (not an attachment). The email will always only go to the same email address and I would like the subject line to reflect the data from cells E20 & R20 (FYI: cell E20 will be client's first name and cell R20 will be client's last name). I would also like the formatting to stay as it is in excel.

    Any help would be great!

    Thanks
    Last edited by LindaABH; 08-16-2012 at 07:39 PM.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Create macro to send worksheet as body of email using cells as subject line

    Hi Linda

    See this link...it addresses your issue. If you need help adapting let me know.
    http://www.rondebruin.nl/mail/folder3/mail4.htm
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    08-03-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Create macro to send worksheet as body of email using cells as subject line

    Thanks! I will give it a go and let you know if I have problems.

  4. #4
    Registered User
    Join Date
    08-03-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Create macro to send worksheet as body of email using cells as subject line

    Thanks! That is perfect. I've adapted the code to what I want. However, I do have a couple of issues if you can help. The first is, I don't know how to get the subject line to be the data in cells E20 & R20. Below is the section of code I've used for the subject line:

    Please Login or Register  to view this content.
    The second issue I have, is that most of the sheet is is protected so that the user can hit tab and it automatically goes to fields that they need to fill in. I saw a bit in the link you gave me about the sheet needing to be unprotected and that you can write this into the macro. However, I didn't understand how to do that part. Is it possible? The protection on the sheet doesn't necessarily need to be password protected if that helps.

    Thanks for your help so far!
    Last edited by Cutter; 08-16-2012 at 01:05 PM. Reason: Added code tags

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Create macro to send worksheet as body of email using cells as subject line

    @ LindaABH

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
    Thanks.

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Create macro to send worksheet as body of email using cells as subject line

    Hi Linda

    For this
    subject line to be the data in cells E20 & R20
    try
    Please Login or Register  to view this content.
    For this
    the sheet needing to be unprotected
    it's as simple as this
    Please Login or Register  to view this content.
    However, were it me I'd Google "protect user interface excel vba". It allows code to run on a protected worksheet.

  7. #7
    Registered User
    Join Date
    08-03-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Create macro to send worksheet as body of email using cells as subject line

    Genius! That solved everything I needed. Thanks!!

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Create macro to send worksheet as body of email using cells as subject line

    You're welcome...glad to be of help.

+ 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