Do you send a lot of messages to one person or group and want to make it easier to address a message to those addresses?
Is it possible to add a button to the toolbars that would launch a new message with John Doe's email address already filled in when you click on it?
Yes! This is possible. There are several methods available, depending on your version of Outlook.
All versions: Use a macro assigned to a toolbar button that creates a new message and inserts the address. Create a macro for each address or group and assign it to a command button. Sample macro below.
All versions: Use a Template or published form that includes the addresses. Open a new message form, enter the addresses and any other information you want to always include (but do not include your signature), then either save it as a template or publish it as a custom form. Open the template or custom form when you want to send a message to that person. See How to Open Outlook Templates and Files using Toolbar Buttons
Outlook 2007, 2003 and 2002: Create hyperlinked buttons using the mailto command.
Use a macro
This macro opens a default form and inserts the desired address or addresses into the To field. Use objMsg.CC or objMsg.BCC to add addresses to those fields.
You can use either the address, or if you have a contact for the person, use their display name. It use a Contact Group (distribution list), use the group name and Outlook will resolve it.
Customize the toolbar to create a button for the macro. If you use the macro more than once, be sure to change the Sub name.
Sub NewMessagetoSomeone() Dim objMsg As MailItem Set objMsg = Application.CreateItem(olMailItem) objMsg.To = "address;address;address;" objMsg.Display Set objMsg= Nothing End Sub
Address a message to a contact
Use this macro to open a message form with the address of a selected contact filled in.
Public Sub SendtoContact() If TypeName(ActiveExplorer.Selection.Item(1)) = "ContactItem" Then Set oContact = ActiveExplorer.Selection.Item(1) Dim objMsg As MailItem ' Blank message ' Set objMsg = Application.CreateItem(olMailItem) ' Use a template Set objMsg = Application.CreateItemFromTemplate("C:\path\to\template.oft") objMsg.To = oContact.Email1Address 'displays the message form so you can enter more text objMsg.Display 'use this to send to outbox 'objMsg.Send Set objMsg = Nothing Else MsgBox "Sorry, you need to select a contact" End If End Sub
I found out the way to create the macro to a an email template and add it to the the contact template quick access bar, and when click on it, it opens up a new email based on the template.
So the most important question is what to add to the macro that will create the email to the email address of the contact I open.
Is there a way to instead of filling out the actual email address, you put in the code to the field of the email address that is in the contact, so it automtically uses that email address in the field when you run that macro?
I appreciate the response that takes care of this.
You are selecting a contact and want to use that address in a template? I have code for that on the site - New message to contacts. To use a template, change the Set objMsg line to Set objMsg = Application.CreateItemFromTemplate("C:pathtotemplate.oft")
I found out the way to create the macro that opens an email template and add it to the the contact template quick access bar, and when click on it in a contact, it opens up a new email based on the template. So the most important question is what to add to the macro that opens an email template and will create the email to the email address of the contact I open. Here is what I learned on line and shows the macro, so if someone knows how to add the area to the macro so it creates the email to the address of the contact I open, that would take care of it all. Nobody has responded in the forums so just asking the question again. Thank you. Hear is what I learned: Now create the macro: 1.On the Developer tab click Macros. 2.Type in a Macro Name (e.g. MyTemplate) and click Create. 3.A VBA screen opens, with the cursor in between Sub and End Sub. Copy the following text in this space: Set msg = Application.CreateItemFromTemplate("C:\Documents and Settings\\Application Data\Microsoft\Templates\MyTemplate.oft") msg.Display The full text in the macro should now look like this (obviously with path and file… Read more »