Hi,
wir haben einige unserer Anwender mit großen Postfächern dazu angewiesen, nicht mehr benötigte Mails zu löschen.
Einige haben daraufhin ganze Projektordner gelöscht, was nun dazu führte, dass der Ordner zwar weg ist, die Mails aber noch unter "All Documents" zu finden sind.
Gibt es eine Methode diese loszuwerden, ohne tatsächlich die Mails nun einzeln löschen zu müssen?
Es gab Skripte, die "Ordnerlose" Mails in den Posteingang oder Trash schieben, aber irgendwie wollte der Agent nie so recht starten.
Dieses Skript versuche ich irgendwie unterzubringen:
Code
Sub Initialize
Dim s As New notessession
Dim db As notesdatabase
Dim fDoc As NotesDocument ' Document in folder
Dim ad As notesview ' All Documents view
Dim aDoc As notesdocument ' document in All Docs view
Dim fUNID() As String ' array of UNID's of docs in folders
Dim i As Integer ' UNID array index
Dim deldate As notesitem
Dim Chair1 As notesitem
i =0
Set db = s.CurrentDatabase
Redim fUNID(0)
' Build UNID array by looping through folders, then their documents
Forall view In db.views
If view.IsFolder And Not view.Name=("($All)") Then
Set fDoc = view.GetFirstDocument
While Not fDoc Is Nothing
Redim Preserve fUNID(i)
fUNID(i) = fDoc.UniversalID
i=i+1
Set fDoc = view.GetNextDocument(fDoc)
Wend
End If
End Forall
' Loop through docs in the All Documents view and compare UNIDs to each doc in the array
Set ad = db.GetView("($All)")
Set aDoc = ad.GetFirstDocument
While Not aDoc Is Nothing
i = 0
Do While i <= Ubound(fUNID)
If fUNID(i) = aDoc.UniversalID Then
Exit Do
End If
i = i + 1
Loop
Set deldate = adoc.getfirstitem("delivereddate")
Set Chair1 = adoc.getfirstitem("CHAIR")
If i > Ubound(fUNID) And Not deldate Is Nothing And Chair1 Is Nothing Then
Call adoc.PutInFolder( "($Inbox)")
End If
Set aDoc = ad.GetNextDocument(adoc)
Wend
End Sub
Alles anzeigen
Aber wie bekomm ich das mit dem Designer in das Postfach? Habe damit leider reichlich wenig Erfahrung...