MPAQUIN
asked on
Out of Office assistant script
I would like to set-up a script that turn the Out of Office assistant for someone,s else mailbox. The reason is some supervisor, when their employee don't come in, they often forget about setting their Out of Office and keep asking me to do it, so if I give them a small script it would ease the process.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Dim mapiSession
Dim sMailbox
Dim sServer
strMailbox = "Username"
strServer = "ExServer"
Set mapiSession = CreateObject("MAPI.Session
If Err.Number = 0 Then
Wscript.Echo "Logged in!"
mapiSession.OutOfOffice = True
mapiSession.OutOfOfficeTex
Wscript.Echo "OOF set!"
End If
mapiSession.Logoff
Set mapiSession = Nothing
Wscript.Echo "Logged off!"