Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-30-2016, 08:02 AM
RealmOfCOnfusion RealmOfCOnfusion is offline VBA to change font colour in email body on send Windows 7 64bit VBA to change font colour in email body on send Office 2007
Novice
VBA to change font colour in email body on send
 
Join Date: Jun 2016
Posts: 1
RealmOfCOnfusion is on a distinguished road
Default VBA to change font colour in email body on send

With the help of some Excel VBA gurus I've managed to get some code that changes a specific font colour in the body of any email to black before the email is sent.

(Background: We have an employee who is dyslexic and finds it much easier to read characters on screen when the font colour is set to pink, so this code - see below - changes that specific colour to black when the user clicks on Send).

Code:
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    If TypeName(Item) <> "MailItem" Then Exit Sub
    Item.HTMLBody = Replace(Item.HTMLBody, "#FF0066", "#000000", Compare:=vbTextCompare)
End Sub
This works fine, but she's now advised that she sometimes likes to amend the font colour from time to time (she seems to have some sort of variable dyslexia!), so what I need is something to change all of the text in the body of the email to black, rather than just replacing the one specific colour which is what the code above does.



Any suggestions?
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA to change font colour in email body on send Macro to change font in email, dependent on which email account is being used gb82 Outlook 2 01-23-2016 01:54 AM
VBA to change font colour in email body on send Send as PDF button in Word Body wordJohn Word 1 03-24-2015 04:29 AM
VBA to change font colour in email body on send Format email body-Using Excel VBA to send mail Claytocb Excel Programming 1 01-31-2013 11:58 PM
VBA to change font colour in email body on send Change font colour when tasks are completed meileetan Project 3 09-12-2012 07:09 AM
Font Change when I send to Coworker magictoaster Word 1 05-31-2012 02:16 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:13 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft