My goal:I’m trying to automatically move the focus of the current highlighted document (or caret location) to a specific document in a view embedded within a document at the time when it’s loading without manual intervention.
I’m trying to use NotesUIView.SelectDocument(NotesDocument), but it doesn’t appear to be working.
Attempts to date:
-
I’ve tried making this call within the PostOpen event of the embedded view, but I get a popup dialog “Command not available”.
-
I’ve tried making the call from the PostOpen event of the document containing the embedded view, but when I Set NotesUIView = NotesUIWorkspace.CurrentView, the NotesUIView is Nothing. (It doesn’t appear to know of the existence of the view in the UI since the focus isn’t on the embedded view when the document opens and I don’t know a way to make it the focus.)
-
I tried using a NotesTimer in the PostOpen of the embedded view to trigger an event handler located outside the view events (event handler Sub is in Globals area of the view), but that doesn’t appear to work either. (The same problem as the above attempts depending on how I try to set the NotesUIView).
The only way I’ve been able to get NotesUIView.SelectDocument to work is within a view action on the embedded view, but that requires the user to manually trigger the button…unless someone knows of a way to trigger a view action button automatically?
Does anyone know of any way for me to implement this? Any ideas would be appreciated. Thank you.