+ Reply to Thread
Results 1 to 5 of 5

sending Email (via outlook) from Excel with cell range and image from external file

  1. #1
    Forum Contributor
    Join Date
    09-05-2011
    Location
    Essex, England
    MS-Off Ver
    Excel 2003 Excel 2007
    Posts
    383

    sending Email (via outlook) from Excel with cell range and image from external file

    Hi,

    I've been looking to send a cell range from excel via outlook email, which I have managed successfully with the vba code I found below. However I would like to embed or have added a picture in a similar fashion to the insert--picture route. The picture is currently located in a network folder s:\headers.

    I've spent a little while searching for a solution but the answeres I found went miles over my head.

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: sending Email (via outlook) from Excel with cell range and image from external file

    This works for me (Excel & Outlook 2003).
    Please Login or Register  to view this content.
    The RangeToHTML function is the same as in your post.

    As noted in the comment in the code, if you use Send to send the email immediately instead of Display, the image appears as a file attachment rather than an embedded image. If you prefer Send and having the image properly embedded, try the code at http://www.outlookcode.com/d/code/htmlimg.htm, combined with the string manipulation in my code which inserts the image tag in a suitable place in the HTML string.

  3. #3
    Forum Contributor
    Join Date
    09-05-2011
    Location
    Essex, England
    MS-Off Ver
    Excel 2003 Excel 2007
    Posts
    383

    Re: sending Email (via outlook) from Excel with cell range and image from external file

    wow that simple eh?

    That was so helpful thank you!
    Last edited by Kramxel; 04-19-2012 at 06:52 AM.

  4. #4
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: sending Email (via outlook) from Excel with cell range and image from external file

    Your initial reply, now edited, asked how to put the image at the top of the email rather than the bottom. Maybe you've worked it out, but for the benefit of others here's how.

    Replace:
    Please Login or Register  to view this content.
    with:
    Please Login or Register  to view this content.
    Post responsibly. Search for excelforum.com

  5. #5
    Forum Contributor
    Join Date
    09-05-2011
    Location
    Essex, England
    MS-Off Ver
    Excel 2003 Excel 2007
    Posts
    383

    Re: sending Email (via outlook) from Excel with cell range and image from external file

    Hi Chippy,

    Yes I did manage to work it out realised like most things the solution was far easier than I was expecting so quickly removed it (well not as quickly as I had hoped).

    once again thank you so much.

    althogh I didn't add the + Len("<body>") O just took the / away... i'll add that now and see what the difference is.

+ 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