+ Reply to Thread
Results 1 to 6 of 6

I am using a VBA code that sends emails

  1. #1
    Forum Contributor
    Join Date
    05-30-2013
    Location
    Isreal
    MS-Off Ver
    Excel 2010
    Posts
    191

    I am using a VBA code that sends emails

    Hi
    I am using a VBA code that sends emails
    In a using a string that stores text in a string named Temp_Body then I use a HTMLBody for the text that will be sent in the email
    Here is the code that I use:

    Please Login or Register  to view this content.
    Is there anyway I can change the color and font of the Temp_Body?

    Thank you in advance for your help.
    Last edited by starlev; 05-15-2015 at 11:34 AM.

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: I am using a VBA code that sends emails

    HTMLBody = "<font color="red">" & Temp_Body & "</font>" & vbNewLine & vbNewLine & RangetoHTML(rng)
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Forum Contributor
    Join Date
    05-30-2013
    Location
    Isreal
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: I am using a VBA code that sends emails

    Hi.

    I Just tried What you suggested and while trying to compile I received the following error

    Syntax error.


    please advise
    Eli

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: I am using a VBA code that sends emails

    Ahh yes. You'll need to double up on the quotes within the string.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    05-30-2013
    Location
    Isreal
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: I am using a VBA code that sends emails

    Thanks again for your help.
    I am not sure where to put the "<br/>"
    Can you please advise not familiar with HTML.

  6. #6
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: I am using a VBA code that sends emails

    Stop posting this question, it should be a single thread. I have answered you in the other thread

    Posted here: http://www.excelforum.com/excel-prog...ormatting.html

+ 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. Replies: 1
    Last Post: 04-13-2016, 08:46 AM
  2. Need a macro that sends out emails from outlook base off of dates in excel
    By Wery123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2015, 10:20 PM
  3. Use of CDO code to send emails failing
    By DEB1000 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-29-2015, 03:49 PM
  4. Help with code to send automatic emails
    By hauckj14 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-16-2015, 12:45 PM
  5. Help! Macro that sends auto emails based on date
    By just2005 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-17-2014, 08:20 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