Devi creare un\'agente da eseguire dal menù con questo codice : Sub Initialize Dim s As New notessession Dim db As notesdatabase Dim rulesfolder As notesview Dim rules As notesviewentrycollection Dim rule As notesviewentry Dim ruledoc As notesdocument Set db=s.currentdatabase Set rulesfolder=db.getview("Rules") Set rules=rulesfolder.allentries Set profile=db.GetProfileDocument("CalendarProfile") \'Optional code to remove rule entries from the Calendar Profile which did not disable as expected. \'The code can be used if you want to "clean out" the rule entirely in the profile. \'NOTE: The code below will disable the C&S Miniview rule so it must be manually re-enabled. If profile.getitemvalue("Use_CalendarRule")(0) = "1" Then profile.Use_CalendarRule = "0" End If Set Count=profile.getfirstitem("$FilterFormulaCount") Call count.remove Forall ff In profile.Items If ff.type = 1536 And Lcase(Left(ff.name,15)) = "$filterformula_1" Then Call ff.remove End If End Forall Call profile.Save(True, True) If profile.getitemvalue("Use_CalendarRule")(0) = "1" Then number=1 Else number=0 End If Set rule=rules.getfirstentry While Not rule Is Nothing Set ruledoc=rule.document ruledoc.ordernum=Cstr(number) Call ruledoc.save(True, True) Set rule=rules.getnextentry(rule) number=number+1 Wend End Sub Vedi anche questo post: http://forum.dominopoint.it/Dominopoint/new_forum.nsf/WebBoardSub?OpenView&RestrictToCategory=FFCC4716468618B4C1257479005300C2&Count=30#0CB081F52538C527C125748300451C6E
|