Last reviewed on June 21, 2014   —  3 Comments

The idea for this macro came from Dan, who is looking for a way to assign a category when a meeting is accepted.

I would like to change the color of a meeting once the invitee accepts the invitation. Looking at my calendar if the meeting is still the default color I'd know I need to follow up to ensure they're going to attend. Do you know of a way to do this?

You can do this using a variation of our Autoaccept a Meeting Request using Rules macro, using it with a Run a Script rule to look for accepted meeting responses and then add a category to the associated appointment.

This method can be used to change any field in the associated appointment. Remember, if you change the subject, location, or time, Outlook will need to send an update.

How to use this macro

Open Outlook's VBA editor (Alt+F11), right click on Project1 and choose Insert > Module. Paste the code into the module, then create the rule with the 'run a script' Action and select this script.

Use a run a script rule to  change a meeting after it is accepted

Complete steps for using the VBA Editor and SelfCert are at How to use the VBA Editor

Sub AcceptedMeetings(oRequest As MeetingItem)
If oRequest.MessageClass <> "IPM.Schedule.Meeting.Resp.Pos" Then
  Exit Sub
End If
Dim oAppt As AppointmentItem
Set oAppt = oRequest.GetAssociatedAppointment(True)
oAppt.Categories = "Green"

End Sub

To use this macro with declined or tentative responses, change the message class to one of the following message classes:

Message Class Response
IPM.Schedule.Meeting.Resp.Pos Accepted meeting response
IPM.Schedule.Meeting.Resp.Neg Declined meeting response
IPM.Schedule.Meeting.Resp.Tent Tentative meeting response


  1. Richard Arnold says

    Hi, I'm not sure if this would solve my issue but would like your advice.

    The current situation that I have is as follows: -

    • Nicky is Marks Delegate
    • Nicky receives meeting invites which are intended for Mark in her inbox
    • Mark also receives the same meeting invite in his inbox
    • Nicky will accept the invite on Mark’s behalf and the invite is then removed from Nicky’s inbox
    • Mark however still has the invite in his inbox
    • Mark can click on the invite and see that Nicky has accepted and that no action is required by Mark

    The issue we have is that Mark does not want to see invites that Nicky has already accepted on his behalf, but does want to see invites that Nicky has not responded to. Mark says that the number of invites that he gets clutters up his inbox and to be able to remove the invites that have already been dealt with by Nicky would be a great advantage to Mark.

    Would the VB script in this example you have provided work for Nicky to be able to update Marks Inbox with Green for invites accepted by Nicky or is there a more slick method just to be able to remove the invite from Marks inbox (Which incidentally says "No Response Required") which may be better?

  2. Josh says

    I am getting an error message as the rule executes. It his highlighting this line of code:
    Dim oAppt As AppointmentItemSet

    The error states "Compile Error: User-defined type not defined"

    Does it matter that I am using Outlook 2010?

    • Diane PoremskyDiane Poremsky says

      That has part of another line added to it - it should end with appointmentitem and set goes on the next line.
      Dim oAppt As AppointmentItem

Leave a Reply

Please post long or more complicated questions at OutlookForums by

If the Post Comment button disappears, press your Tab key.