Out of Office agent question - scripting

Is there a way via script to populate a users Exceptions fields within their Out of Office agent? I want to tell the agent not to auto reply if the subject contains specific text by using the “Do not automatically reply if the subject contains these phrases” field. I have 120 users that need this field populated and am trying to avoid going around to each users machine to fill this field in manually.

Thanks in advance

Subject: Out of Office agent question - scripting

Have you tried getting the profile document (OutOfOfficeProfile) and then modifying the IgnoreSubjectPhase field? If you need help getting a handle on the profile document there is an agent in the mail template called EditOfficeProfile which you can look at.

Subject: RE: Out of Office agent question - scripting

Thanks Robert. I’ll take a look into that.

Subject: RE: Out of Office agent question - scripting

Works like a charm. I was able to tweak the code to the following and then send it out in a button via email:

Dim session As notessession

Dim uiws As New notesuiworkspace

Dim m_officeprofile As notesdocument

Dim nSuccess As Integer

Set session = New notessession

Set m_officeprofile = session.CurrentDatabase.GetProfileDocument(“OutOfOfficeProfile”)

Call m_officeprofile.ReplaceItemValue(“IgnoreSubjectPhrase”,“Subject text”)

MessageBox “Your Out of Office Profile document has been modified”, MB_OK, “Finished!”