Link to home
Start Free TrialLog in
Avatar of jwright77
jwright77

asked on

How to block meeting requests

Our CEO doesn't want to recieve meeting requests.  Is there a way to block all requests.  I have created a rule that deletes them but they still show up on his calendar.
Avatar of Mestha
Mestha
Flag of United Kingdom of Great Britain and Northern Ireland image

I don't think you can.
I certainly haven't seen any way.
The only thing I can think of is to use Delegates to send the requests to someone else, but those will still appear on the calendar as tentative until the delegate declines them.

Simon.
Avatar of David Lee
Hi, jwright77.

I might be able to do it with a bit of scripting.  Is that an option?
Avatar of jwright77
jwright77

ASKER

Sure.
ASKER CERTIFIED SOLUTION
Avatar of David Lee
David Lee
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the script.  But I'm getting an runtime error 13 Type mismatch error in line 4.
On line 2 change

    olkResp As Outlook.MailItem


to

    olkResp As Object
BlueDevilFan,

Thanks for your help.  But the code is not working.  It doesn't appear to do anything.  I attached the code as I have it below.

Thanks
Sub IgnoreMeetingRequests(Item As Outlook.MeetingItem)
    Dim olkAppt As Outlook.AppointmentItem, olkResp As Object
    Set olkAppt = Item.GetAssociatedAppointment(True)
    Set olkResp = olkAppt.Respond(olMeetingDeclined, True)
    olkResp.Send
    Item.Delete
    Set olkAppt = Nothing
    Set olkResp = Nothing
End Sub

Open in new window

I tested the code before posting, so I know it works.  Did you follow all of the instructions I posted exactly?  Can you post a screen shot showing the rule you created for running this?
Yes.  I followed your instructions to a T.  I attached the rule.  


Thanks
outlook-rule.doc
Ok.  Replace the code with the version below and test again.  I added a command to display a popup message if the code fires.  The first step is to determine if the code is running at all.
Sub IgnoreMeetingRequests(Item As Outlook.MeetingItem)
    Dim olkAppt As Outlook.AppointmentItem, olkResp As Object
    MsgBox "IgnoreMeetingRequests Fired"
    Set olkAppt = Item.GetAssociatedAppointment(True)
    Set olkResp = olkAppt.Respond(olMeetingDeclined, True)
    olkResp.Send
    Item.Delete
    Set olkAppt = Nothing
    Set olkResp = Nothing
End Sub

Open in new window

It does not fire.  I checked the security under Tools--macros--security and it is set to low.


Thanks
This happens sometimes.  Add the code below to the ThisOutlookSession module.  Close and restart Outlook.  You should get a warning about macros and be asked if you want to enable them.  Say yes.  Try the original code again.
Private Sub Application_Startup()
    MsgBox "Macros enabled"
End Sub

Open in new window

Sorry, but I have to object.  The solution I posted does work and does do exactly what the question author asked for.
The solution is in this post
http:#a24403033