Results 1 to 9 of 9

Send Table/Range of Cells As Part of Body through Outlook(HTML) using VBA

Threaded View

richardking Send Table/Range of Cells As... 06-29-2016, 12:38 AM
humdingaling Re: Send Table/Range of Cells... 06-29-2016, 12:43 AM
richardking Re: Send Table/Range of Cells... 06-29-2016, 01:28 AM
humdingaling Re: Send Table/Range of Cells... 06-29-2016, 01:39 AM
richardking Re: Send Table/Range of Cells... 06-30-2016, 02:00 AM
humdingaling Re: Send Table/Range of Cells... 06-30-2016, 02:21 AM
richardking Re: Send Table/Range of Cells... 06-30-2016, 04:32 PM
humdingaling Re: Send Table/Range of Cells... 06-30-2016, 08:28 PM
richardking Re: Send Table/Range of Cells... 06-30-2016, 08:58 PM
  1. #1
    Forum Contributor
    Join Date
    01-15-2015
    Location
    philippines
    MS-Off Ver
    Excel 365
    Posts
    116

    Send Table/Range of Cells As Part of Body through Outlook(HTML) using VBA

    Hi Guys,

    I have been searching this forum and google for hours over 3 days to have this done, and yes, I have checked on Ronde Bruin's site and I cant figure it out. All I want is to include 5 dynamic tables that I have in excel as part of a body of an email in outlook, exactly as how they look like in excel. I have already figured out everything else like sending the email in "on behalf", sending it to multiple recipients, having the subject to be time specific, having a hyperlink as part of the body with signature, and I'm now stuck with just the tables that is the main purpose of the email.

    The file contains 5 sheets. 4 tables would come from "On today" sheet which is arranged vertically separated by an empty row after each table, and the remaining table would come from a different sheet labelled as "individual". All tables are 7 cells wide, and would grow indefinitely down the table.

    The table would look something like the sample below. The underlined word is a hyperlink which I already know how to do.

    Please check on the data below.
    Date 1 2 3 4 5 6
    1/1 a b c d e f
    1/2 g h i j k l
    1/3 m n o p q r

    Date 1 2 3 4 5 6
    2/1 a b c d e f
    2/2 g h i j k l
    2/3 m n o p q r

    Additionally, here's part of the code that I used. I am hoping that your solution would pick up from here since this is more understandable to me. Hoping that I have posted all the information needed. And thanks in advance

    Dim olApp As Outlook.Application
    Dim olEmail As Outlook.MailItem
    Set olApp = New Outlook.Application
    Set olEmail = olApp.CreateItem(olMailItem)
    With olEmail
    .SentOnBehalfOfName = "name"
    .BodyFormat = olFormatHTML
    .Display
    .HTMLBody = "Body" & .HTMLBody
    .To = "To"
    .Subject = "Subject"
    End With
    Last edited by richardking; 06-29-2016 at 01:32 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Vba to draft html body in outlook
    By arun.sj in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 07-15-2015, 07:37 AM
  2. How to send a Spreadsheet in the body as a table in Outlook
    By starlev in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-22-2015, 09:26 AM
  3. Using HTML Body Format in Outlook mail
    By akash kothari in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-08-2014, 11:33 AM
  4. Excel ws into outlook html body with current html signature
    By Cadelanne in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-29-2014, 09:03 AM
  5. Send e-mail with image on body (.html) on e-mail manager <> outlook
    By mariotnc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-05-2012, 09:28 PM
  6. Send mails attaching files with HTML body range of content
    By vijanand1279 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-16-2011, 09:55 AM
  7. Excel macro to send HTML Body email
    By Benjamin2008 in forum Excel General
    Replies: 1
    Last Post: 05-01-2010, 05:29 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