+ Reply to Thread
Results 1 to 14 of 14

Macro Sending an Email from excel with an object in the body.

  1. #1
    Registered User
    Join Date
    11-27-2012
    Location
    Adelaide, south australia
    MS-Off Ver
    Excel 2013
    Posts
    26

    Post Macro Sending an Email from excel with an object in the body.

    Hi

    I need an Macro that I can send an email from excel and paste an object in the body.

    I want it to the following
    copy and a range of cells as an object or picture.
    Open MS Outlook
    Fill in Recipient
    Subject - need to lookup a cell for the details
    Paste Object in the body
    Send email
    Many thanks

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,012

    Re: Macro Sending an Email from excel with an object in the body.

    .
    Paste this into a routine module :

    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-27-2012
    Location
    Adelaide, south australia
    MS-Off Ver
    Excel 2013
    Posts
    26

    Arrow Re: Macro Sending an Email from excel with an object in the body.

    Hi

    Thank you very much for writing the macro for me, the email sent perfectly but unfortunately without the picture in the body.

    At the email - end sub - there was a line then (separator) then after the separator was - Function, is the macros suppose to show as 2 separate and/or is there I way I need to join them ?

    I only changed the range in the function macro, should I have changed more details.

    I made a SnagIt of the macro but don't know how to attached it to this thread, I clicked on above but it does nothing

    sorry I'm new to this

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Macro Sending an Email from excel with an object in the body.

    Try yhis way.
    Just change red text to correct sheet and Range.

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  5. #5
    Registered User
    Join Date
    11-27-2012
    Location
    Adelaide, south australia
    MS-Off Ver
    Excel 2013
    Posts
    26

    Post Re: Macro Sending an Email from excel with an object in the body.

    Hi,

    When I run the macro I get an error saying "Microsoft Excel has stopped working" - Restart the program.
    How do I attach a copy of what I have entered for you to look at?
    Many thanks

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Macro Sending an Email from excel with an object in the body.

    Click the Go Advanced button under the Quick Reply window.
    Scroll down to Manage Attachments.
    Click Choose File and select the file you want to attach.
    Click Upload and Close Window.
    Submit Reply.

  7. #7
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,012

    Re: Macro Sending an Email from excel with an object in the body.

    .
    The first macros I posted contain a SUB and a Function. They look like two separate macros. Both must be in the same routine module. You can download the attached file in the first post and study the code there.

    Here is another project that allows you to paste an image into the email body :

    Please Login or Register  to view this content.
    Because there is an image associated with this project, I zipped everything together. You'll need to change the paths in the code to suit your computer.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    11-27-2012
    Location
    Adelaide, south australia
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: Macro Sending an Email from excel with an object in the body.

    Hi,

    Please see attached.
    Attached Files Attached Files

  9. #9
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,012

    Re: Macro Sending an Email from excel with an object in the body.

    Mhay5656

    Your project looks really good. Was there something else you needed for it or are you done ?

  10. #10
    Registered User
    Join Date
    11-27-2012
    Location
    Adelaide, south australia
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: Macro Sending an Email from excel with an object in the body.

    Hi
    I cant get it to work

  11. #11
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,012

    Re: Macro Sending an Email from excel with an object in the body.

    .
    Works here ...

    Image2.jpg

  12. #12
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Macro Sending an Email from excel with an object in the body.

    Works just fine on my end too.

  13. #13
    Registered User
    Join Date
    11-27-2012
    Location
    Adelaide, south australia
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: Macro Sending an Email from excel with an object in the body.

    Thank you.

  14. #14
    Registered User
    Join Date
    11-27-2012
    Location
    Adelaide, south australia
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: Macro Sending an Email from excel with an object in the body.

    Hi again
    This work really well and thank you, one more question is there a way you can print the email?

+ 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. Search & Replace in email body when sending an email with Excel
    By DreamEyes in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-16-2016, 07:52 AM
  2. Sending the body of an email to excel
    By Teblol in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-28-2015, 10:30 AM
  3. Sending Excel Charts in the Body of an Email
    By mikaselm in forum Outlook Formatting & Functions
    Replies: 1
    Last Post: 09-12-2014, 03:55 PM
  4. Sending Excel Charts in the Body of an Email
    By mikaselm in forum Excel General
    Replies: 1
    Last Post: 08-28-2014, 08:12 PM
  5. Body Text properties when sending email through Lotus Notes via Macro
    By PCLIVE in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-21-2006, 11:15 AM
  6. [SOLVED] sending & retrieving excel data in body of outlook email
    By mismarple in forum Excel General
    Replies: 2
    Last Post: 09-22-2005, 11:05 AM
  7. Replies: 2
    Last Post: 02-23-2005, 06:06 PM

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