Subject: Private Folders?
Check this extract from Lotus KB:
Solution
The answer is “No”. There is no way to convert a Private View into a Shared View. The designer of the application would create a new “Shared” View. However, with LotusScript you would be able to create a document collection of all the documents in the Private View and place them into a “Shared” Folder. Below is a sample code.
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim dbdir As New NotesDbDirectory("Server Name") 'specify domino server here
Dim View As NotesView
Dim DeleteView As NotesView
Dim OriginalView As String
Dim doccounta, doccountb As Integer
Set db = dbdir.GetFirstDatabase(DATABASE)
While Not(db Is Nothing)
'specify database file type here - in this case mail database or use * for every type
If db.FilePath Like "*" Then
Print "Processing database: " + db.FilePath
Call db.open("","")
’ process thru array of views and folders
Forall Views In db.Views
Set View = Views
’ identify private view/folder
If Not Isempty(View.Readers) Then
Doccounta = 1
OriginalView = View.Name
Print "Found Private View or Folder: " + OriginalView
Set DeleteView = View
Set Doc= View.GetFirstDocument
’ place private folder documents into temporary folder
While Not Doc Is Nothing
Print "Please wait, copying Doc: ";Cstr(Doccounta)
Call Doc.PutInFolder( "FolderTemp" )
Set Doc= View.GetNextDocument(Doc)
Doccounta = Doccounta + 1
Wend
’ delete private folder
If Not DeleteView Is Nothing Then Call DeleteView.Remove
End If
Doccountb = 1
Set View = db.GetView("FolderTemp")
If Not View Is Nothing Then
Set Doc= View.GetFirstDocument
’ recreate private folder as shared and populate with docs from temporary folder
While Not Doc Is Nothing
Print "Please wait, writing Doc: ";Cstr(Doccountb);" of ";Cstr(Doccounta-1)
Call Doc.PutInFolder( OriginalView )
Set Doc= View.GetNextDocument(Doc)
Doccountb = Doccountb + 1
Wend
Call View.Remove ' remove temporary folder
End If
End Forall
End If
Set db = dbdir.GetNextDatabase ' navigate to next database file
Wend
End Sub
Supporting Information:
This code needs to be executed with the Users ID of the Private View. Either place the code in an agent and sign the agent with the User’s ID or place the code in a button.