OpenNTF.org - OpenNTF Mail Experience
OpenNTF Mail ExperienceOpenDocument[/Projects/pmt.nsf/ProjectView?ReadForm&Query=]

My Links (Not logged in)
User Name Password
Hosted by Prominic.NET

   Project: OpenNTF Mail Experience (Managed by Vince Schuurman)
Actions:

Hide details for The requestThe request

The idea
Proposed by:David C Slatter
Project Master Chef:Vince Schuurman
Feature type:Functionality
Brief Description:Agent to remove all empty folders.
Status:Rejected

Details
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

Action taken
Status:Rejected
Implemented in Release:
Comments:


Modification history
Entered 24-Apr-2007 13:15 by David C Slatter. Last Modified <none> by <none>.