Change Private Folders to Public Folders
Thursday 5th October, 2006Came across a scenario where a group of
users were complaining about personal folders they created in the Notes
Client were not appearing when they checked their mail using iNotes. As
an Admin if I opened their mail file via the client, I saw the exact same
folders when I opened their mail file using iNotes. It wasn't until
they sent a screen shot of their Notes Client and iNotes that I realized
several of the user's personal folders were not appearing in iNotes.
History & Competitive Product Lesson:
This group of users were migrated from MS Exchange to Lotus Notes a little over a year ago. Recently they had their mail template changed from the Standard Mail Template to the DWA Template in 6.5. Once they were changed to the DWA Template and started using iNotes, they immediately noticed the problem.
MS Exchange has a feature called Public Folders. When you create a Public Folder, anything you put in your Public Folder can be seen by other users. Nice feature if you want everyone creating random collections of data out of their mail files to be shared with everyone in the company.
Anyway, how this problem got started was when these users started creating personal folders in their Lotus Notes Mail files, they realized they could create both "Shared" and "Private" folders. They thought that since MS Exchange had Public Folders, obviously Lotus Notes has the same functionality and just call it "Shared" folders. One big problem is these folders can not be seen with in iNotes. Similar problems exist when doing a Load Convert -U because the server can't see the folders either to convert them.
Solution:
Well, to fix the problem we have to send a button via an email to every user that has created private folders. The button has code that creates a new folder with the same name but appends "temp" to it. Then moves the contents of the private folder to the new Shared folder and deletes the old private folder and then changes the new folder back to the original folder name by removing "temp". If the private folder happens to be empty, we just delete the private folder and move on.
Thanks to Robert Michlowitz for writing the LotusScript.
robertm25@yahoo.com
Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim entries As NotesViewEntryCollection
Dim str_foldername As String
' process thru array of views and folders
Forall folder In session.CurrentDatabase.Views
' identify private view/folder
If Not Isempty(folder.Readers) And folder.IsFolder Then
Set entries = folder.AllEntries
If entries.Count = 0 Then
Call folder.Remove
Else
str_foldername = folder.Name
Call entries.PutAllInFolder(str_foldername &"temp", True)
Call folder.Remove
Set view = session.CurrentDatabase.GetView(str_foldername & "temp")
view.Name = str_foldername
End If
End If
End Forall
Messagebox "Private folders have been updated. Your mail file will now be closed so the changes can take affect.", 64, "Update Complete"
Call ws.CurrentDatabase.Close
End Sub
History & Competitive Product Lesson:
This group of users were migrated from MS Exchange to Lotus Notes a little over a year ago. Recently they had their mail template changed from the Standard Mail Template to the DWA Template in 6.5. Once they were changed to the DWA Template and started using iNotes, they immediately noticed the problem.
MS Exchange has a feature called Public Folders. When you create a Public Folder, anything you put in your Public Folder can be seen by other users. Nice feature if you want everyone creating random collections of data out of their mail files to be shared with everyone in the company.
Anyway, how this problem got started was when these users started creating personal folders in their Lotus Notes Mail files, they realized they could create both "Shared" and "Private" folders. They thought that since MS Exchange had Public Folders, obviously Lotus Notes has the same functionality and just call it "Shared" folders. One big problem is these folders can not be seen with in iNotes. Similar problems exist when doing a Load Convert -U because the server can't see the folders either to convert them.
Solution:
Well, to fix the problem we have to send a button via an email to every user that has created private folders. The button has code that creates a new folder with the same name but appends "temp" to it. Then moves the contents of the private folder to the new Shared folder and deletes the old private folder and then changes the new folder back to the original folder name by removing "temp". If the private folder happens to be empty, we just delete the private folder and move on.
Thanks to Robert Michlowitz for writing the LotusScript.
robertm25@yahoo.com
Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim entries As NotesViewEntryCollection
Dim str_foldername As String
' process thru array of views and folders
Forall folder In session.CurrentDatabase.Views
' identify private view/folder
If Not Isempty(folder.Readers) And folder.IsFolder Then
Set entries = folder.AllEntries
If entries.Count = 0 Then
Call folder.Remove
Else
str_foldername = folder.Name
Call entries.PutAllInFolder(str_foldername &"temp", True)
Call folder.Remove
Set view = session.CurrentDatabase.GetView(str_foldername & "temp")
view.Name = str_foldername
End If
End If
End Forall
Messagebox "Private folders have been updated. Your mail file will now be closed so the changes can take affect.", 64, "Update Complete"
Call ws.CurrentDatabase.Close
End Sub
[2]