Manage Learn to apply best practices and optimize your operations.

How To Change Design Of User's Mail Folders

In the user's mailfile, the design of the folder is based on the design of the
view ($All) . But once the folder is created, the design will remain unchanged
even if there is a design change in the view ($All).

In order to let the update the folder design in all user's mailfile, a
lotusScript agent can be created and scheduled to run on the server over the
weekend, or alternatively, let the users runs the agent at their own free time.

The following is the code for the agent. Note that there are a few standard
folders that you should not change the design.
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

Dig Deeper on Lotus Notes Domino User Settings

SearchWindowsServer

Search400

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury

SearchDataCenter

SearchContentManagement

Close