From within a form I need to create a document, then have it selected in an embedded view on that form. Any ideas?

I have a form (parent) with multiple embedded views (children). Within the parent form, the user will click something to create a child document. I want that new child document to be selected in one of the embedded child views.

The main problem is:

SelectDocument() is only available from uiview which is only available from workspace.

How would one get a handle to the correct embedded view? Thanks for any ideas.

Dim workspace As New NotesUIWorkspace

'Create & save new child document

Dim doc As NotesDocument

Set doc = …

call doc.save(true, false)

'Refresh child view so new child document shows up

dim childview as Notesview

set childview = …

call childview.refresh

call workspace.refresh

'Move view cursor to new document

Dim uiview As NotesUIView

Set uiview = workspace.CurrentView 'Which view is this???

if not(uiview is nothing) then Call uiview.SelectDocument(doc)