You can use a VBA macro to create a new message and preset any of the fields, including To/CC/BCC, the subject, expiration date, flags, voting options and more.
To use, use Alt+F11 to open the VBA editor and paste the following code into ThisOutlookSession. Remove the fields you don't want to set and edit the values in the fields you want to set automatically.
Add the macro to a toolbar or ribbon button or to the QAT.
Public Sub CreateNewMessage() Dim objMsg As MailItem Set objMsg = Application.CreateItem(olMailItem) With objMsg .To = "Alias@domain.com" .CC= "Alias2@domain.com" .BCC = "Alias3@domain.com" .Subject = "This is the subject" .Categories = "Test" .VotingOptions = "Yes;No;Maybe;" .BodyFormat = olFormatPlain ' send plain text message .Importance = olImportanceHigh .Sensitivity = olConfidential .Attachments.Add ("path-to-file.docx") ' Calculate a date using DateAdd or enter an explicit date .ExpiryTime = DateAdd("m", 6, Now) '6 months from now .DeferredDeliveryTime = #8/1/2012 6:00:00 PM# .Display End With Set objMsg = Nothing End Sub
Send a new message to From address of selected messages
You can easily tweak the macro above to loop through a selection of messages and send a new message to the senders.
To use, select one or more messages then run the macro. As written, it opens the messages so you can review them and send yourself. You can change .display to .Send if you want to send them automatically. (Use .display when testing.)
Public Sub CreateNewMessage() Dim objMsg As MailItem Dim Selection As Selection Dim obj As Object Set Selection = ActiveExplorer.Selection For Each obj In Selection Set objMsg = Application.CreateItem(olMailItem) With objMsg .To = obj.SenderEmailAddress .Subject = "This is the subject" .Categories = "Test" .Body = "My notes" & vbcrlf & vbcrlf & obj.Body .Display ' use .Send to send it automatically End With Set objMsg = Nothing Next End Sub
Create a new contact with some fields filled in
You can use the same method with other Outlook items. This example creates a new contact with a country and city and part of phone number.
Use TaskItem and olTaskItem for Tasks, AppointmentItem and olAppointmentItem for appointments. You'll need to replace the fields with the correct properties for the item type. You can get the property names from VBA Help or at MSDN.
Public Sub CreateNewContact() Dim objContact As ContactItem Set objContact = Application.CreateItem(olContactItem) With objContact .BusinessAddressCity = "Halifax" .BusinessAddressCountry = "Canada" .Business2TelephoneNumber = "902123" 'the area code and local prefix .Display End With Set objContact = Nothing End Sub
Create a new Appointment
This macro creates a new appointment with the Location field filled in. Other fields can be added to it and if you need an meeting, click Invite attendees on the ribbon.
Sub CreateApptLocation() Dim olAppt As AppointmentItem Set olAppt = Application.CreateItem(olAppointmentItem) With olAppt .Subject = "My Subject" .Location = "My Favorite place" .Categories = "Business" .Display End With End Sub