+ Reply to Thread
Results 1 to 19 of 19

Email from Excel with body text

  1. #1
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    277

    Email from Excel with body text

    HI

    CAn anyone help please, i have an excel file that i have setup with and email button with the following code

    Application.Dialogs(xlDialogSendMail).Show "[email protected], [email protected]", " Travel Request"

    It has the 2 email adresses and a subjet header " Travel Request". this all works fine just how i want it too.

    But i want to and an email body text. ie

    " please quote me for the following request". This will save me from typing it in all the time as the email will be the same everytime.

    Can anyone tell me what code i need for this

    Thank you

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Email from Excel with body text

    Hi,

    I don't believe the SendMail method contains this facility although I'd be delighted to hear otherwise.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    277

    Re: Email from Excel with body text

    Oh ok thank you. Do you know another code that will work doing
    what I need

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Email from Excel with body text

    Not quite sure if this helps ??

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

    Re: Email from Excel with body text

    Quote Originally Posted by Pepe Le Mokko View Post
    Not quite sure if this helps ??
    the one in the link if you're sending an HTML formatted email or the code below if it is a basic format.

    Please Login or Register  to view this content.
    If I've been of help, plz add reputation.

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Email from Excel with body text

    Quote Originally Posted by donkey_uk View Post
    Oh ok thank you. Do you know another code that will work doing
    what I need
    That's an interesting link Pepe has shown. I'm about to check it out since at first glance it seems a new offering from Ron de Bruin, certainly not one I've seen before.

    The one I tend to use more often than not is

    Please Login or Register  to view this content.
    Last edited by Richard Buttrey; 10-06-2014 at 09:30 AM. Reason: End Sub missing

  7. #7
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    277

    Re: Email from Excel with body text

    Hi will both the code work with Lotus notes and Outlook?

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Email from Excel with body text

    Can't comment about Lotus Notes since this is essentially an Excel forum. However from memory, and even if Lotus Notes uses the Lotus Script programming language that 123 uses, I still think not since the Lotus Script syntax differed somewhat to VBA.

  9. #9
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Email from Excel with body text

    That's an interesting link Pepe has shown. I'm about to check it out since at first glance it seems a new offering from Ron de Bruin, certainly not one I've seen before.
    It's been around for some time now Richard, works great

    @donkey RFon de Bruin also provides some code for Lotus Notes

  10. #10
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    277

    Re: Email from Excel with body text

    Thank you for the help guys. i have one more question with refrence to the subject line at the mo im useing this

    Application.Dialogs(xlDialogSendMail).Show "[email protected], [email protected], [email protected]", " Travel Request"

    How do i refence it so it pick up info from 3 cells and uses that for the subject code ie K8 & M9 & P8.

    I did have this but i could not get it to work

    SendMail ThisWorkbook.Sheets("mysheet").Range("l1").Value, _
    ThisWorkbook.Sheets("mysheet").Range("l1").Value

    Can anyone help with the code for me please

    Thank you

  11. #11
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Email from Excel with body text

    Please add tags around code - Thx

  12. #12
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    277

    Re: Email from Excel with body text

    Hi. Sorry pepe.

  13. #13
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    277

    Re: Email from Excel with body text

    Hi.

    I have found what I want now but one small problem I cant work out how to put a space between ech cell. here is the code

    Please Login or Register  to view this content.
    D11 & D13 the word say mikeransom and not mike ransom.

    Pepe Sorry I don't know how to tag the code
    Last edited by donkey_uk; 10-06-2014 at 02:29 PM.

  14. #14
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Email from Excel with body text

    Quote Originally Posted by donkey_uk View Post
    Hi.


    Pepe Sorry I don't know how to tag the code
    Have you checked the Forum Rules? Specifically #3

  15. #15
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    277

    Re: Email from Excel with body text

    Quote Originally Posted by Richard Buttrey View Post
    Have you checked the Forum Rules? Specifically #3
    Thank you I have done it now.

  16. #16
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Email from Excel with body text

    Hi,

    Thanks

    Perhapsv

    Please Login or Register  to view this content.
    To add a space just include a [& " "] string without the []

  17. #17
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    277

    Re: Email from Excel with body text

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    Thanks

    Perhapsv

    Please Login or Register  to view this content.
    To add a space just include a [& " "] string without the []
    Thank you so much, its easy really lol. Thank you to everyone for your help

  18. #18
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    277

    Re: Email from Excel with body text

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    Thanks

    Perhapsv

    Please Login or Register  to view this content.
    To add a space just include a [& " "] string without the []
    Thank you so much, its easy really lol. Thank you to everyone for your help

  19. #19
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    277

    Re: Email from Excel with body text

    Oops one last question. When I click on send it opens up my emails. Is there a code that will just send the email without opening up ?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Email each person in excel, including a body of text and attachment
    By memanja in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-12-2014, 10:41 AM
  2. Add to Excel from Outlook when a email body contain a specific text
    By mathewfer in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 05-08-2013, 08:28 AM
  3. Using Excel vba to send hyperLinks in the body text of an Outlook email using a checkbox
    By PatrickASnyder in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-29-2013, 04:13 PM
  4. Exporting text from email body to excel via button
    By dobracik in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-14-2013, 09:48 AM
  5. Replies: 4
    Last Post: 02-27-2012, 03:13 AM

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