• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

VBA/Macro to remove page colour when replying or forwarding email

gb1

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
#1
I am looking to create a macro to remove the page colour from an email when replying to it or forwarding it, either automatically on the single click of a button, instead of having to go to the setting on the ribbon, which takes a few clicks. I've looked around, but can't find any solutions. I assume there must be a property that needs switching?
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
#2
This method (using a simple blank stationery file) will work - Apply Outlook Stationery to Replies and Forwards - (that sample is manual - it can be made to apply automatically when you hit reply or forward, if you want to use it with all messages).

Trying to strip just the background color from a message is a little more difficult, unless it is always the same color - the script needs to look at the source code and replace the color with #FFF - using a method similar to this: How to Change the Font used for Outlook's RSS Feeds - but using regex to grab the entire bgcolor tag. Doing it on inbound mail might be easier than only changing replies and forwards.
 

gb1

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
#3
Diane
Thanks this is very helpful. I don't have a lot of experience with regex, but have begun exploring. However in the sample email I'm looking at, there are a number of bgcolor and background-color tags - any clues as to how to identify which is the important one?
Another thing I've tried based on your first suggestion is to create a small plain white jpg and referencing that in the HTML template. That does the trick, but its a bit of a patch, because I am effectively covering the background color, and adding some weight to the email?