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.
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.
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" oAppt.Save End Sub
To use this macro with declined or tentative responses, change the message class to one of the following message classes:
|IPM.Schedule.Meeting.Resp.Pos||Accepted meeting response|
|IPM.Schedule.Meeting.Resp.Neg||Declined meeting response|
|IPM.Schedule.Meeting.Resp.Tent||Tentative meeting response|
More Run a Script Samples:
- Autoaccept a Meeting Request using Rules
- Convert RTF Messages to Plain Text Format
- Create a rule to delete mail after a number of days
- Forward meeting details to another address
- How to Change the Font used for Outlook's RSS Feeds
- Keep Canceled Meetings on Outlook's Calendar
- Move messages CC'd to an address
- Outlook AutoReplies: One script, many responses
- Outlook's Rules and Alerts: Run a Script
- Process messages received on a day of the week
- Read Outlook Messages using Plain Text
- Run a Script Rule: Change Subject then Forward Message
- Run a script rule: Reply to a message
- Run a Script Rule: Send a new message when a message arrives
- Sort messages by Sender domain
- Use a Rule to delete older messages as new ones arrive
- Use a run a script rule to mark messages read
- Use VBA to move messages with attachments