I am using Outlook 2013 and I'm trying to figure out how to create a script to automate the process of enabling the OoO assistant for specific time range.
So far, I've created the script (you can see the corresponding function) below, which can successfully alter the text and enable the OoO assistant but I can't find if it is possible to set a specific time range.
Private Function Set_OoO(Subs As String, M As String, oStores As Outlook.Stores, oStr As Outlook.Store, oPrp As Outlook.PropertyAccessor)
Dim oStorageItem As Outlook.StorageItem
Set oStorageItem = Application.Session.GetDefaultFolder(olFolderInbox).GetStorage("IPM.Note.Rules.O ofTemplate.Microsoft", olIdentifyByMessageClass)
oStorageItem.Body = "I am out of the office, please talk to " + Subs
oStorageItem.Save
For Each oStr In oStores
If oStr.ExchangeStoreType = olPrimaryExchangeMailbox Then
Set oPrp = oStr.PropertyAccessor
Call oPrp.SetProperty(M, True)
End If
Next
Set olkIS = Nothing
Set olkPA = Nothing
End Function