Nicht verzagen, Forum Fragen !!
Habe hier einen Agenten, der die Arbeit macht. Ich habe den Code noch nicht getestet, aber so bem ersten Betrachten scheint das genau das zu sein, was du brauchst
Sub Initialize
Dim Session As New NotesSession
Dim Currentdb As NotesDatabase
Dim newfolder As String
Dim tempfolder As NotesView
Dim doc As NotesDocument
Set Currentdb = Session.CurrentDatabase
'Create new folder for each existing folder and copy all mails from existing folders to
'new folder
Forall view In currentdb.views
If view.IsFolder And view.name <>"($Inbox)" And view.name <>"($Trash)" And _
view.name <> "$Alarms" And Right(view.name, 6) <> "(New!)" Then
newfolder = view.name & "(New!)"
Set doc = view.GetFirstDocument
Do While Not doc Is Nothing
Call doc.PutInFolder(newfolder)
Set doc = view.GetNextDocument(doc)
Loop
End If
End Forall
'Remove existing folder if there is a corresponding new 'folder
Forall view In currentdb.views
If view.IsFolder And Right(view.name, 6)= "(New!)" Then
Set tempfolder = currentdb.GetView(Left(view.name, Len(view.name)-6))
If Not tempfolder Is Nothing Then
Call tempfolder.remove
End If
End If
End Forall
Forall view In currentdb.views
If view.IsFolder And Right(view.name, 6)= "(New!)" Then
Set doc = view.GetFirstDocument
Do While Not doc Is Nothing
Call doc.PutInFolder(Left(view.name,Len(view.name)-6))
Set doc = view.GetNextDocument(doc)
Loop
Call view.remove
End If
End Forall
End Sub