Outlook 2003 and VBA Script help

Associate
Joined
13 Jun 2005
Posts
1,416
Location
West Midlands
Hi Guys,

I am setting up a rule so that one of our users is able to auto accepts meeting requests from specific people.

Scouring on the net has lead me to the following instructions -

Begin with a rule using the conditions "from people or distribution list" and "uses the specified form", choosing the Meeting Request form under Application forms.

Since there is not an action to respond to meeting requests, you'll need to use a script to accept it. Outlook MVP Michal Bednarz offers this script, which you need to add to ThisOutlookSession before creating the rule.


Sub AutoAcceptMeetings(oRequest As MeetingItem)

If oRequest.MessageClass <> "IPM.Schedule.Meeting.Request" Then
Exit Sub

Else
Dim oAppt As AppointmentItem
Set oAppt = oRequest.GetAssociatedAppointment(True)

Dim oResponse
Set oResponse = oAppt.Respond(olMeetingAccepted, True)
oResponse.Display

End If

End Sub


Open Outlook's VBA editor (Alt+F11), expand Microsoft Office Outlook Objects and double click on ThisOutlookSession. Type or paste the code into the module, then create the rule.


I have managed to get this to work so far in that when a specific person sends me an invite the script runs fine and then I receive an email that I have to send as this is my "Acceptance" of the meeting request.

Basically my question is - is it at all possible that I can get the accept/response to send automatically also?

Not sure if I've made sense but any help is much appreciated.

:)
 
Yea, i done something similar years ago. If i remember correctly I was creating a new email rather than replaying.

Sorry I cant post the code was my last job :)
 
I didn't look but I guess the oResponse is a message object so it's probably got a way you can change the subject/body text as well.

glad you got it working.
 
Back
Top Bottom