Categories
Microsoft Office Productivity Technology

Create an Outlook Appointment from a Mail

Although there is the functionality within Outlook where you can drag an email message and drop it on the calendar menu to automatically create an appointment – it copies many of the attributes of the email but it does not copy the mail sender & recipients to the appointment.

The following macro will allow you to do this:

Public Sub createCalendarFromMail()
    Dim olApp   As Outlook.Application
    Dim item    As Object
    Dim mailItem    As Outlook.mailItem
    Dim calItem As Outlook.AppointmentItem
    
    If TypeName(Application.ActiveWindow) = "Inspector" Then
        Set item = Application.ActiveWindow.CurrentItem
        If TypeOf item Is Outlook.mailItem Then
            Set mailItem = item
            Set olApp = Application
            Set calItem = olApp.CreateItem(olAppointmentItem)
            calItem.Subject = mailItem.Subject
            calItem.Body = mailItem.Body
            calItem.RequiredAttendees = mailItem.SenderEmailAddress & "; " & mailItem.CC
            calItem.Display
            calItem.Save
        End If
    End If
 
End Sub

https://github.com/RossGoodman/Outlook/blob/master/CalendarFromMail

In simplistic terms, this macro confirms that you are reading a single email then creates a calendar appointment and transposes some of the attributes of the e-mail message to the calendar appointment.
Notably the sender and CC of the message to the required attendees.

I’ve not done extensive testing on this but it seems to work so far.

This works best when you add a macro button to the tool-bar so that it is available when you are reading mail messages.

Leave a Reply

Your email address will not be published. Required fields are marked *