Results 1 to 3 of 3
  1. #1
    dixiesstar is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2012
    Posts
    2

    Change Font Style of only 1 line of an Auto Generated Email

    I have a code in an access database that once it completes the update, it will automatically generate an email. I now need the first line to stand out (to bring attention to some changes). I would like it to be in bold, red font size 24, but would like the other lines of the email body to stay as they are now (black font size 11). Below is a sample of my code. As it indicates, i want the first line to be bold, red, font size 24 and the other lines to be regular, black, font size 11. Any suggestions?


    Code:
    With OutMail        
    .To = "abc@yahoo.com"        
    .CC = ""        
    .BCC = ""        
    .Subject = "Updates"        
    .Body = "I WANT THIS LINE TO BE BOLD, FONT SIZE 24 AND TEXT COLOR TO BE RED" & vbCrLf & vbCrLf & vbCrLf & _        
    "this is the remainder of the body of the email. it should be in regular text, font size 11, color black"


  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You have to construct the body as a string with HTML code tags.

    Review http://www.devhut.net/2010/09/03/vba...ok-automation/
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    dixiesstar is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2012
    Posts
    2
    That did the trick! Thank you so much!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Change font color in Query
    By Brian62 in forum Queries
    Replies: 2
    Last Post: 01-10-2013, 09:14 PM
  2. Auto-Generated Email
    By jle0003 in forum Access
    Replies: 3
    Last Post: 08-20-2012, 01:33 PM
  3. font type doesn't change
    By tramantana in forum Reports
    Replies: 9
    Last Post: 05-28-2012, 10:35 AM
  4. Replies: 1
    Last Post: 11-11-2010, 11:56 PM
  5. Color/font change in subform
    By AndyKim in forum Forms
    Replies: 9
    Last Post: 06-24-2009, 04:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums