Hi There,
I have an agent in a database which runs to see if an assignee is out of office. the agent uses ‘agent.IsEnabled’ code to find if its enabled or not.
The problem i am having is that someone may enable their out of office agent, but for a time in the future. Is there a way where i can get the time for set in their out of office agent?
Here is my code so far :
Sub CheckOfficeStatus(PDoc)
Dim s As New NotesSession
Dim Mdb As New NotesDatabase("","")
Dim strUCode As String
Dim strMailPath As String
Dim OAgent As NotesAgent
strUCode = PDoc.Usercode(0)
strMailPath = PDoc.MailPath(0)
If strMailPath = "" Then
Exit Sub
End If
Set Mdb = s.GetDatabase(dbMailServer,strMailPath)
Set OAgent = Mdb.GetAgent("OutOfOffice")
If OAgent.IsEnabled = True Then
Pdoc.OfficeStatus = "Yes"
Elseif OAgent.IsEnabled = False Then
Pdoc.OfficeStatus = "No"
End If
End Sub
Thanks for any help, it would be fantastic if i could get this working!
F1H