Using VBA to set Outlook 2007 Out of Office - how do I set the date/time range?

I have been using many macros I wrote for various Out of Office messages I leave in Outlook 2007.  We have recently upgraded to Exchange 2007 (finally!!) and now I can't find any info on how to set the Date and Time range and the font & font size settings for Out of Office messages via VBA.  I have attached the code for the macro I use when leaving for the day.
Sub OOO7Home()
    Const PR_OOF_STATE = ""
    Dim olkIS As Outlook.Store
    Dim olkPA As Outlook.PropertyAccessor
    Dim olkOOFMessage As Outlook.StorageItem
    Dim Text1, Text2, Text3, TextComma As String
    TextComma = ", "
    Text1 = "Thanks for your e-mail! "
    Text2 = "My hours are 7:30 - 4:00 and I am gone for the rest of today, "
    EndOfWeek = InputBox("Last day of the week?  y/n", "Out of Office", "n")
    If UCase(EndOfWeek) <> "Y" Then
        Text3 = ".  I will reply to your e-mail in the morning.  If this is an urgent matter, please call 1234."
        Text3 = ".  I will reply to your e-mail Monday morning.  If this is an urgent matter, please call 1234."
    End If

    For Each olkIS In Session.Stores
        If olkIS.ExchangeStoreType = olPrimaryExchangeMailbox Then
            Set olkPA = olkIS.PropertyAccessor
            olkPA.SetProperty PR_OOF_STATE, True
            Set olkOOFMessage = Outlook.Session.GetDefaultFolder(olFolderInbox).GetStorage("IPM.Note.Rules.OofTemplate.Microsoft", olIdentifyByMessageClass)
            olkOOFMessage.Body = Text1 & Chr$(13) & Chr$(13) & Text2 & WeekdayName(Weekday(Date)) & TextComma & Date & Text3
            Exit For
        End If
    Set olkIS = Nothing
    Set olkPA = Nothing
    Set olkOOFMessage = Nothing
End Sub

Open in new window

Who is Participating?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.