Sub Initialize Dim session As New NotesSession Dim db As NotesDatabase Dim collection As NotesDocumentCollection Dim doc As NotesDocument Set db = session.CurrentDatabase Set collection = db.UnprocessedDocuments Set doc = collection.GetFirstDocument() Dim i As Integer Dim dbc As NotesDatabase Dim views As Variant While Not(doc Is Nothing) Set dbc = New NotesDatabase(doc.mailServer(0), doc.mailDatabase(0)) views = dbc.Views i=0 If Not(Isempty(views)) Then Forall v In views If ( v.IsFolder ) Then If (v.Name <> "($JunkMail)")_ And (v.Name <> "(Group Calendars)")_ And (v.Name <> "(Rules)")_ And (v.Name <> "($Alarms)")_ And (v.Name <> "($Inbox-Categorized)")_ And (v.Name <> "($Inbox)")_ And (v.Name <> "($Trash)") Then i=i+1 Print v.Name Cstr(i) End If End If End Forall End If doc.serverWrote = i Call doc.Save(False,False) Set doc = collection.GetNextDocument(doc) Wend Messagebox Cstr(collection.Count)+ " document(s) updated. You must refresh the view to see these updates.", 64, "Folder Count" End Sub