folgender Code entfernt die im Profile aktiven Regel:
Sub Click(Source As Button)
On Error Resume Next
Dim notes_ses As New notessession
Dim cur_db As notesdatabase
Dim profile_doc As NotesDocument
Dim count_item As NotesItem
Set cur_db=notes_ses.currentdatabase
Set profile_doc=cur_db.GetProfileDocument("CalendarProfile")
If profile_doc.getitemvalue("Use_CalendarRule")(0) = "1" Then
profile_doc.Use_CalendarRule = "0"
End If
Set count_item=profile_doc.getfirstitem("$FilterFormulaCount")
Call count_item.remove
Forall ff In profile_doc.Items
If ff.type = 1536 And Lcase(Left(ff.name,15)) = "$filterformula_" Then
Call ff.remove
End If
End Forall
profile_doc.Save(True, False)
End Sub
Alle in der MailDB definierten Regeln sollten vorher deaktiviert werden, dann den Agenten in einer Mail mittels Button ausführen.
Allen Codefetischisten sei gesagt, der Agent ist natürlich ein wenig rabiat ohne alles geschrieben aber er tut's wenn ich mal meinen Ruhestand antrete kümmere ich mich darum ihn in eine elaegante Form zu bringen
MfG KAI