I have a series of macros that I use to set different messages in the Out Of Office assistant. They have worked fine in 2003, but now, the CreateObject("MAPI.Session
") is not liked. I cannot find the 2007 equivalent of this statement.
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, "
Text3 = ". I will return your e-mail in the morning. "
Set oSession = CreateObject("MAPI.Session")
oSession.Logon "", "", False, False
'Set the body text.
oSession.OutOfOfficeText = Text1 & Chr$(13) & Chr$(13) & Text2 & WeekdayName(Weekday(Date)) & TextComma & Date & Text3
'Turning on Out of Office
oSession.OutOfOffice = True