I have been experiencing intermitant problems with NotesUIView.SelectDocument. The context of the problem is the following. There is code in the postopen a database which searches for a document owned by the user who opens the database and positions itself on the document in the uiView which is opened. The code works fine but seems to stop working for an unknown reason after having worked for a given period of time. I’ve tried deleting the cache.ndk of the user and optimizing the workspace but the problem persists. One strange fact is that if I remove database’s icon from the workspace and reopen the database, the problem doesn’t occure, but when the database is closed and opened again, the problem returns. When the database is opened, the view is positioned at the complete bottom but if I press on arrow up or down on the keyboard, I see that the doc was indeed selected, but the view was not positioned to display it. I’ve tried adding a uiview.refresh before and/or after the selectdocument, but this didn’t help. Here’s the portion of code that has the problem:
Dim ws As New NotesUIWorkspace
Dim db As NotesDatabase
Dim vue As NotesView
Dim doc As NotesDocument
Dim uiView As NotesUIView
Set db = session.CurrentDatabase
Set vue = db.GetView(“TOUS_NOM”)
Set doc = vue.GetDocumentByKey(session.CommonUserName, True)
If Not doc Is Nothing Then
Set uiView = ws.CurrentView
If Not uiview Is Nothing Then
Call uiView.SelectDocument(doc)
End If
End If
Any help would be appreciated!