• Anonymous
  • Login
  • Register
OpenNTF Mail Experience - Feature Request: Agent to remove all empty folders.


Sub Initialize
Dim session As New NotesSession
Dim ws As New NotesUIWorkspace
Dim askme As Variant
Dim vc As NotesViewEntryCollection
Dim db As NotesDatabase
Dim view As notesview
Dim views As Variant
Dim x As Long
Dim msg As String
Dim Entrycount As Long
Print msg & "Looking For Empty Folders "

Set db = session.CurrentDatabase
views = db.Views
msg = "FOUND " & Cstr(0) & " - "
x = 0

Forall v In views
If Not ( Left(v.name,1) = "(" Or Left(v.name,1) = "$" ) Then
Set vc = v.Allentries
Entrycount = vc.Count
If v.Isfolder And Entrycount = 0 Then
Redim Preserve viewarray(x) As String
viewarray(x) = v.Name
x = x +1
msg = "FOUND " & Cstr(x) & " - " & v.Name
End If
Print msg & " looking at " & v.Name
End If
End Forall

askme = ws.Prompt(PROMPT_OKCANCELLISTMULT, _
"Un Select all the Folders you want to Keep", _
"Un Select All of the empty Folders you want to Keep.", _
viewarray,viewarray)

If Isempty(askme) Then
Messagebox "User canceled or No empty folders found ", , "No folders selected"
Else

Forall ask In askme
Set view = db.GetView(ask)
If Not ( view Is Nothing) Then
Call view.Remove
End If
End Forall
Messagebox "Folders have been removed. Close and reopen the datebase to see the changes.", , "Folders Deleted"
End If
End Sub



Taken Actions by Owners

Owners have rejected the request.



In this field you can enter the actual request.

You can use the rich text editor for rich text formating. You can also enter HTML to embed objects, e.g. to embed a YouTube video or a screenshot of the project. In this case use '[' and ']' to mark the passthrough HTML as such.

Please note that the first time you use the new UI your description is converted from rich text to MIME. You might want to copy and paste the raw plain text from the old UI in the new UI so that you don't loose information.
In this field owners can describe what they have done or want to do.

You can use the rich text editor for rich text formating. You can also enter HTML to embed objects, e.g. to embed a YouTube video or a screenshot of the project. In this case use '[' and ']' to mark the passthrough HTML as such.

Please note that the first time you use the new UI your description is converted from rich text to MIME. You might want to copy and paste the raw plain text from the old UI in the new UI so that you don't loose information.