outlook out of office based on appointments

phairplay

Active Member
Joined
Nov 2, 2011
Messages
260
is there a outlook marco that could turn on my out of office response. if I set a calandar appointment to out of office?
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Yes, but with some complications.

You would need to write code that checks the ReminderFire Event and determines if the reminder is associated with an appointment, and if that appointment's BusyStatus property is set to 'Out of Office'.

Ex:

Code:
Private WithEvents MyReminders As Outlook.Reminders
Private Sub Application_Startup()
  Set MyReminders = GetOutlookApp.Reminders
End Sub
Function GetOutlookApp() As Outlook.Application
  Set GetOutlookApp = Outlook.Application
End Function
Private Sub MyReminders_ReminderFire(ByVal ReminderObject As Reminder)
  If ReminderObject.Item.BusyStatus = 3 Then  ' out of office
' set out of office
  End If
End Sub

Visit this link for code to set OOO: Set Out Of Office programmatically

One problem is, you would need to keep Outlook open, so the reminder (and the resulting VBA) will fire. I also assume you will want to programmatically turn off OOO after the appointment is over. After setting OOO, you would probably need to set a task reminder for when the appointment ends and then write more VBA that checks for that reminder and turns off OOO.
 
Upvote 0

Forum statistics

Threads
1,222,550
Messages
6,166,729
Members
452,066
Latest member
the_rizzler

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top