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

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close