We have a user who works part time - so I thought I would write an agent that would automatically set her out of office (OOO) agent for her so no one forgot.
The agent does not seem to work i.e kick of the OOO agent - but when I view the changes via the mailfile OOO profile it looks all set and enabled?
I am just wondering whether I have overlooked anything. I am assuming that when the OOO agent is set that only the CalendarProfile document is changed and the OOO Agent enabled?
Here is an overview of what I have done:
Agent Runs every night.
If it is the persons day off it updates the calenderprofile document with the correct dates and enables the ooo agent.
Is there anything else I am missing here?
The mailfile is using an 8 template and the servver is running 8.
Here are the fields being change on the calendar profile:
docP.AppendSubject = “1”
docP.AppendSubjectDate = “( returning “+endDate$+”)”
docP.BookBusyTime=“1”
docP.CurrentStatus=“1”
docP.CurrentStatusDisplay=“On”
Set item = docP.ReplaceItemValue (“dateFirstDayBack”,s.CreateDateTime(endDate$ +“00:00:00 CET”))
Set item = docP.ReplaceItemValue (“dateFirstDayOut”,s.CreateDateTime(startDate$ +“00:00:00 CET”))
Set item = docP.ReplaceItemValue (“FirstDayOut”,s.CreateDateTime(startDate$))
Set item = docP.ReplaceItemValue (“FirstDayBack”,s.CreateDateTime(endDate$))
docP.DaysOut = "I am out of the office until " + endDate$
docP.daysoutdisplay = "I will be out of the office starting “+startDate$+” and will not return until "+endDate$
docP.SpecialBody = "I am out of the office until "+endDate$
docP.SpecialMessage=“”
docP.showhours=“”
docP.starttime=“”
docP.endtime=“”
Call docP.Save(False, False)
agent.IsEnabled = True Call agent.Save