Please email me @ aconn@anent.com for more help (code snipits etc) on this or to point me in the direction of anyone needing Notes consulting! Also, this is a long post and I am pressed for time, so I apologize for not being more thorough about this solution, but please don't hesitate to email.
Problem:
=======================
1) You want to force every user in your organization to startup to the same home page (preferabley a corporate portal type app).
2) You want to make this happen automatically without having to manually touch each client installation.
3) You want to override any attempt by the user to change the homepage.
4) You DON'T want to destroy your user's current Bookmarks in this process.
Solution:
1) For my example, I wanted to add a new Bookmarks welcome page that could be centrally modified and maintained. For this I followed pretty much the Iris Today example: http://www-10.lotus.com/ldd/today.nsf/62f62847467a8f78052568a80055b380/0f3d43d63f9dd816852567f90067a7cb?OpenDocument&Highlight=0,welcome,page
2) I wanted to install the new welcome page without asking everyone to delete and recreate their bookmark.nsf from the new server bookmark.ntf template. To solve this, I modified the MAIL5.NTF Memo form and added code to check once a day if the Bookmark.nsf has already been updated.
3) I use the DBDESIGN script library to read the corporate welcome frameset from the Bookmark.ntf and write it into the client Bookmark.nsf. Look in the sandbox for DBDESIGN. Here is a code snipit:
Dim bookmarkDB As New NotesDatabase("","Bookmark.nsf")
Dim dbookmarkDB As New NotesDatabase("MyServer","Bookmark.ntf")
Dim bookmarkDesignObj As databaseDesign
Dim dBookmarkDesignObj As databaseDesign
Set bookMarkDesignObj = createDatabaseDesign(bookmarkDB)
Set dBookmarkDesignObj = createDatabaseDesign(dBookmarkDB)
' Now copy over the CorpWelcomeFrameset
Set doc = dbookmarkDesignObj.GetFrameSetbyName("CorpWelcomeFrameset")
Set tmpDoc = doc.copytodatabase(bookmarkDB)
Then I also copy over the corpWelcome layout document:
' Now copy over the layout:
Set luview = dbookmarkDB.getview("(Layouts)")
Set doc = luview.getdocumentbykey("00000000")
Set tmpDoc = doc.copytodatabase(bookmarkDB)
4) In addition, I want to modify the database intialize script on the client Bookmark.nsf to always reset to the Corp welcome page when the user launches Notes. In the same block of code above, I do the following:
' First delete databasedesign from bookmarks:
designObjects = bookmarkdesignObj.databaseScriptDocuments
If Isarray(designObjects) Then
Forall obj In designObjects
Call obj.remove(True)
End Forall
End If
' Now get new databasedesign and copy over
designObjects = dbookmarkdesignObj.databaseScriptDocuments
Forall obj In designObjects
Set tmpDoc = obj.copytodatabase(bookmarkDB)
End Forall
** The initialize code looks like this:
' Switch welcome page to corporate:
Dim ws As New notesuiWorkspace()
varble = Evaluate({@Word(availablelayouts;"|";2)},ws.currentdocument.document)
ws.currentdocument.document.selectLayout = varble(0)
Call ws.currentdocument.refresh
5) The last trick was to turn off any other Bookmark that the user might've set as the home page using the right-click "Set bookmark as homepage" command. Kudo's to Rod Whiteley for pointing me in the right direction for this:
http://www-10.lotus.com/ldd/46dom.nsf/55c38d716d632d9b8525689b005ba1c0/52728c68934a48dc80256ab1004aa5c9?OpenDocument
The trick to turning off the "flag" Rod mentions is to simply recreate the Outline. In the same POSTOPEN event as above, I also run this code to recreate the outline (yet still preserving the user's bookmarks):
Dim outline As NotesOutline
Dim olEntry As NotesOutlineEntry
Dim newEntry As notesOutlineEntry
Dim nextEntry As NotesOutlineEntry
Dim parentEntry As NotesOutlineEntry
Dim goFromEntry As NotesOutLineEntry
Set Outline = bookmarkDB.GetOutline( "UserBookmarkOrder")
Set nextEntry = Outline.getFirst()
Do Until nextEntry Is Nothing
Set olEntry = nextEntry
' create Copy
Print "Checking " & olEntry.Label
If Not(olEntry.hasChildren) Then
Set parentEntry = outline.GetParent(olEntry)
If parentEntry Is Nothing Then
'Print olEntry.Label & "Has no parent so will create as sibling that is being removed"
Set newEntry = Outline.CreateEntryFrom(olEntry,olEntry,False,False)
'Set goFromEntry = newEntry
Else
'Print olEntry.Label & "Has parent: " & parentEntry.Label & " so will create as child after that parent"
Set newEntry = Outline.CreateEntryFrom (olEntry,parentEntry,True,True)
End If
' get next entry and delete old entry
Set nextEntry = Outline.getnext(olEntry)
Call Outline.RemoveEntry(olEntry )
Else
'Print olEntry.Label & " has children so will skip re-creating it"
Set nextEntry = Outline.getnext(olEntry)
End If
Loop
Call outline.save()

Force Client Homepage Automatically... (Andy Conn 29.Apr.02)
. . 