+ Reply to Thread
Results 1 to 7 of 7

Creating Bold Text in email with VBA code

  1. #1
    Forum Contributor
    Join Date
    04-05-2010
    Location
    Lakewood, IL
    MS-Off Ver
    Excel 2016
    Posts
    384

    Creating Bold Text in email with VBA code

    My program sends an email at the ends. Currently the email is just is default text. What I want to do is have the VBA code make one of the paragraphs in the body of the email be displayed in another color as well as being "bold" font. I have been led to believe I need to change the Body of the email to mtml code, but I am not sure. Here is the current piece of code:
    Please Login or Register  to view this content.
    All the paragraph's text in the email body are pulled from a spreadsheet with the Excel workbook. This is the paragraph I want to change to another color as well be in "bold" font but all the body could be in html in regular font:
    Please Login or Register  to view this content.
    Thanks in advance for any help you people can give me.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Creating Bold Text in email with VBA code

    Yes, you have to use HTML to apply any kind of formatting.

    Please Login or Register  to view this content.
    Example shows red. Replace hex code with desired color.

    Has not been tested.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    04-05-2010
    Location
    Lakewood, IL
    MS-Off Ver
    Excel 2016
    Posts
    384

    Re: Creating Bold Text in email with VBA code

    Thanks 6StringJazzer,

    It worked perfectly. Thanks so much.

    FYI if you add <strong> where the color is identified you will get the color with the text being BOLD.

    Bob

    Please Login or Register  to view this content.
    Last edited by Bobbbo; 11-19-2022 at 05:03 PM.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Creating Bold Text in email with VBA code

    Looks like I forgot about the bold. You can use <b>...</b> for bold. If you use <strong> don't forget </strong>.

  5. #5
    Forum Contributor
    Join Date
    04-05-2010
    Location
    Lakewood, IL
    MS-Off Ver
    Excel 2016
    Posts
    384

    Re: Creating Bold Text in email with VBA code

    You are right. If I forget the </strong> the remainder of the text in the email stayed Bold. This way on the paragraph that is red remains bold. Thnaks again!

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Creating Bold Text in email with VBA code

    If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

  7. #7
    Forum Contributor
    Join Date
    04-05-2010
    Location
    Lakewood, IL
    MS-Off Ver
    Excel 2016
    Posts
    384

    Re: Creating Bold Text in email with VBA code

    Done! Thanks Again

+ 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. Bold Text in Body of Email
    By Tellm in forum Outlook Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2016, 07:32 AM
  2. Assistance sending email with Lotus Notes through excel - Bold Text
    By ciresuark in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-28-2015, 05:19 PM
  3. [SOLVED] Text to Bold, sending to email/Outlook
    By Sagittariu5 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-21-2013, 09:16 AM
  4. [SOLVED] Email code. How to format specific lines in bold.
    By pipoliveira in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-12-2012, 05:20 AM
  5. [SOLVED] Bold text on Access VBA code
    By akotronis in forum Access Tables & Databases
    Replies: 4
    Last Post: 09-03-2012, 05:52 AM
  6. Bold Text in Email body Lotus notes
    By TonyforVBA in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-05-2011, 11:29 AM
  7. Replies: 1
    Last Post: 12-26-2005, 02:40 PM

Tags for this Thread

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