Detect a users Out Of Office Status

Hi,I have been using the small library code snippet below in previous versions for several years to detect a users ‘Out Of Office’ status before sending reminder emails or or redirecting workflow requests.

Now that V8.5 uses ‘OOO as a service’, this code is no longer viable.

Can anybody help with an alternate method/code snippet or suggest a reliable alternative of any sort?

Thanks in anticipation.

============ Code start ===================

Function IsApproverOO(UserName As String) As Integer

'Returns false if approver is in office or true if approver is away

Dim OoODoc As notesDocument

Dim nName As notesName

If OoODb.isopen=False Then

	Print "Could not open OoO database"

	Exit Function

End If

If OoOView Is Nothing Then

	Print "Could not open view in OoO database"

	Exit Function

End If

Set nName=New notesName(userName)

Set OoODoc=OoOView.getDocumentByKey(Lcase(nName.canonical),True)

If OoODoc Is Nothing Then

	IsApproverOO = False

Elseif Lcase(OoODoc.activated(0))="active" Then

	IsApproverOO = True

Else

	IsApproverOO = False

End If

End Function

============ Code End ===================

Subject: Huh

It should not make any difference if out of office is run by a service or not. No really sure how the code worked in the past. If it was adding a document into a ooo db before it can be set to do so in the new template. If it look at the users mail file for a profile doc that doc still exists.

Subject: Check out Extracomm’s Out-of-Office Manager

Please read this post. You can use the LotusScript library to query other people OOO status.

http://blog.extracomm.com/Extracomm/blog.nsf/dx/get-set-Out-of-Office-profile-programmatically-in-Lotus-Notes.htm