Reputation: 911
I use the following code to make sure I go back to a particular view when closing a document and select the newly created document:
Dim ws As New NotesUIWorkspace
Dim uidb As NotesUIDatabase
Set uidb = ws.CurrentDatabase
Call uidb.OpenView("vwMyView", , False)
ws.CurrentView.SelectDocument(Source.Document)
If the view is already open then this code will go to the view defined above and select the document. Accordingly if the view is not open, it will open the view and select our document. This is useful when a new document is created and the view index has not yet been updated.
This code works great, but how do I get this code to work, if I have the view as a part of a frame-set which is also set to be the home-page (home tab).
Edited:
Just to explain the issue further, I have a frameset which links to multiple databases, when a user clicks on the outline control to open a link, it opens a view within the frameset. Then when a new document (which belongs to another database compared to where the outline is) is created from this view, we open a new window outside of this frameset. On closing this document, I want to go back to the frameset (which is now in another database compared to this document) and refresh the view to select current newly document in view. This frameset is the Home page in my case.
Upvotes: 1
Views: 1544
Reputation: 2359
Check whether SetTargetFrame can do something for you:
Call notesUIWorkspace.SetTargetFrame( frame$ )
Upvotes: 2