Welcome to Office Zealot Sign in | Join | Help

Applying Outlook Stationery to more than just new messages

For those of you who love to use stationery to format your Outlook HTML e-mails with fancy images and backgrounds, you probably hate the fact that you can't apply stationery to e-mails that you are replying to - only to new e-mails.

Fear not!  By using the earth shattering power of Outlook VBA macros, you can "trick" Outlook into altering the format of an existing e-mail to insert styles and images from any of the default stationery provided.

I know - it is not good e-mail etiquette to change the format of messages that you are replying to.  After all, non-Outlook users may have an e-mail client that doesn't support HTML messages.  However, businesses (who would like all outgoing e-mails to adhere to the look and feel of their company letterhead) and style conscious e-mail users may find have the option of applying stationery to their reply messages very handy.

Keep in mind that the following sample has not been tested with custom stationery.  It is only designed to work with stationery files that use one set of <STYLE> tags, a background image in the <BODY> tag, and one optional embedded image enclosed in a <CENTER> tag after the <BODY> tag.

This sample is also intended for people who are already somewhat familiar with using macros in Outlook.  If you're not and you want to get up to speed, devour this page:

Visual Basic and VBA Coding in Microsoft Outlook:
http://www.outlookcode.com/d/vb.htm

For more info on how Outlook deals with HTML formatting, see this page:

HTML Mail with Microsoft Outlook:
http://www.slipstick.com/mail1/html.htm

To get started, you can download the sample code [NOTE: link updated 15/08/2007].  Just import the three source files into your Outlook Visual Basic Editor, and map the ReplyWithStationery macro to a custom toolbar on an e-mail form.

Published Thursday, July 21, 2005 10:56 PM by legault
Filed under:

Comments

# re: Applying Outlook Stationery to more than just new messages

I get an error on the first line:

"Dim objFS As Scripting.FileSystemObject"

By the way, I could only import two files, not the FRX file.
Wednesday, August 03, 2005 9:47 AM by Anonymous

# re: Applying Outlook Stationery to more than just new messages

Luke: You need to add a reference to the Microsoft Scripting Runtime Library. Yeah, the .frx file is not essential.
Monday, August 08, 2005 9:19 PM by legault

# re: Applying Outlook Stationery to more than just new messages

I get the same error as Luke. Since i am a newby i don't know how to add a reference to the Microsoft Scripting Runtime Library. Do you know where i can find information to find out more about this?
Friday, October 07, 2005 4:30 AM by Anonymous

# re: Applying Outlook Stationery to more than just new messages

Marie-Claire: Enter the VBA editor (ALT+F11), choose Tools -> References, and then scroll down and select Microsoft Scripting Runtime.
Friday, October 07, 2005 9:00 AM by legault

# re: Applying Outlook Stationery to more than just new messages

Eric, thank you very much for your answer. It works great!
Friday, October 07, 2005 9:58 AM by Anonymous

# re: Applying Outlook Stationery to more than just new messages

I've treid using this and here's the weird part.

I've taken one of the stationaries that comes with outlook and added the images to the directory and changed the html to include my images.

When I try to use the button it works with all other stationaries (except mine) for which I get an error:

Error 5(Invalid procedure call or argument) in procedure ApplyStationaryFormatting of Form frmStationaryChooser

I don't get it. Everything is the same except the images...

Friday, October 14, 2005 7:50 AM by Anonymous

# re: Applying Outlook Stationery to more than just new messages

Zoran: Try comparing the <img> tag, and ensure that the src does not reference any file paths - just the image file name (assuming it is in the same folder as the .html file).
Friday, October 14, 2005 9:15 AM by legault

# re: Applying Outlook Stationery to more than just new messages

Hi, Great info here. Thank you! I am looking for a way to get my Outlook backgrounds to show up in Yahoo. Those recipients of my email don't see any background.

Thanks for any help!
Sunday, April 09, 2006 9:21 AM by Anonymous

# re: Applying Outlook Stationery to more than just new messages

F Smith: Some web-based news readers do not display HTML formatting or embedded images in e-mail messages; they usually just support Plain Text, which cannot display background images.
Monday, April 17, 2006 10:22 PM by legault

# re: Applying Outlook Stationery to more than just new messages

Luke, this is very useful. I get an error message. Could you please help me debug it?
"Compile Error:
Variable not defined" The variable is ActiveInspector.

Thanks Very much!
Sunday, August 06, 2006 5:00 PM by Anonymous

# re: Applying Outlook Stationery to more than just new messages

Hi,

Really wonderful... works like a charm, first time & every time.

Thanks a zill...

Regards,

Manoj
Friday, October 27, 2006 1:36 AM by Anonymous

# Microsoft Outlook 2003 Tip: VBA Macro to Remove Stationery from Email Message | The Substantially Similar Weblog

# creating mail messages from templates | keyongtech

Wednesday, January 21, 2009 9:47 PM by creating mail messages from templates | keyongtech

# Briefpapier verdwijnt bij beantwoorden mail | hilpers

Friday, January 23, 2009 4:50 AM by Briefpapier verdwijnt bij beantwoorden mail | hilpers
Anonymous comments are disabled