Change default action for new mail

Change default action for new mail

Post by Graha » Thu, 24 Jun 2004 00:18:37


Is it possible change change the default form used for the
Standard Outlook toolbar when you click on "New" to create
a new mail.

My company are keen for everyone to use a slightly
different email form which has custom text (shown as a
label) before the subject box, and when the email is sent,
the custom text will be stuck on the front of the email
subject. This is possible via a custom form, however, the
requirement is for everyone to use this by clicking on
the "New" mail button on the toolbar.

Outlook 2000, Exchange 2000


Change default action for new mail

Post by Andrew Cus » Thu, 24 Jun 2004 01:28:47


Yes, this can be done. First, create the new form.
[ If you've alraedy done this, you can skip this
paragraph.] Do this by clicking on NEW to open a blank e-
mail, then choose TOOLS | FORM | DESIGN THIS FORM from
the Tools menu. Design the form to your needs, then
click on the icon at the top left of the Toolbar- the one
that looks like a floppy disk with a blue triangle and a
ruler in front of it. Make a note of the name you Publish
the form under.

You'll want to publish the form to a folder that
everyone has access to - if you're running Exchange
Server, that would be the Organizational Forms Library.
Your Administrator must set the permissions to allow you
to publish there. If you're not using Exchange, publish to
any folder that everyone has access to. See this MSDN
article for more:
(that's all one line, no spaces)

You can then close the form, but when Outlook prompts
you to Save the form, DO NOT save it. I know this seems
counter-intuitive, but you don't want to save it- you
already did in the Publishing step.

Next, you'll need to tell Outlook to use this form
for all new e-mails. Right click on the Inbox folder, and
left click on PROPERTIES. In the form that pops up, click
the drop-down list (combobox) next to WHEN POSTING TO THIS
FOLDER, USE, and left click on FORMS. In the form that
comes up, select the form you just Published. Click OPEN,
then OK.

If you only need to use this new form for new e-
mails, you're done- but you need to tell Outlook to use
the published form on *ALL* PCs that need to use the new

If you need existing e-mails to open in the new form,
you need to change the .MessageClass for all the existing
e-mails. You need to do this using VBA code or a COM add-
in (see Sue Mosher's website for info on COM Add-ins: )

You can use code like this:

[ NOTE: I adapted this from code to change the form for
all Contacts; I haven't tested it for E-mails, so BE

Also, make sure you change NEW_FORM to the name of your
new form in the line:
strNew = "IPM.MailItem.NEW_FORM"


Dim appOl As Outlook.Application
Dim nmsNS As NameSpace
Dim strNew As String
Dim fldInbox As MAPIFolder
Dim itmItems As Items
Dim itmEmail As Object

'change NEW_FORM to the name of your new form:
strNew = "IPM.MailItem.NEW_FORM"

'Declare itmEmail as Object and check the value of the
MessageClass property

Set appOl = CreateObject("Outlook.Application")
Set nmsNS = appOl.GetNamespace("MAPI")
Set fldInbox = nmsNS.GetDefaultFolder(olFolderInbox)
Set itmItems = fldInbox.Items

'Loop through items in the folder:
For Each itmEmail In itmItems
With itmEmail
' Message class needs to be changed - ?
If .Class = olMail Then
If .MessageClass <> strNew Then
' Change the message class:
.MessageClass = strNew
' Save it
End If
End If