R
rflor
I'm trying to turn on the out of office assistant programmatically.
I'm referencing CDO 1.21 library, and I'm using the following code:
Dim objSession As MAPI.Session
Set objSession = CreateObject("mapi.session")
objSession.Logon , , False, False
objSession.OutOfOffice = True
objSession.Logoff
Set objSession = Nothing
The problem I'm having is when a user has their mail delivered to a
..pst. If they are set up to leave mail on the server then this code
works fine, if they have it being delivered to a .pst it fails. "Run
Time Error -2147467262 80004002) [collaboration data objects -
[e_nointerface]. If I change the delivery location this code works
fine.
Is there something else I am missing that will allow this, or is there
some way to programatically change the delivery location before
running the "objSession.OutOfOffice = True" line above, then change
the location again after the out of office it turned on.
I'm referencing CDO 1.21 library, and I'm using the following code:
Dim objSession As MAPI.Session
Set objSession = CreateObject("mapi.session")
objSession.Logon , , False, False
objSession.OutOfOffice = True
objSession.Logoff
Set objSession = Nothing
The problem I'm having is when a user has their mail delivered to a
..pst. If they are set up to leave mail on the server then this code
works fine, if they have it being delivered to a .pst it fails. "Run
Time Error -2147467262 80004002) [collaboration data objects -
[e_nointerface]. If I change the delivery location this code works
fine.
Is there something else I am missing that will allow this, or is there
some way to programatically change the delivery location before
running the "objSession.OutOfOffice = True" line above, then change
the location again after the out of office it turned on.