NotesUIView Handle

I am trying to have a view embedded in a document scroll to that document when the document is opened.When I put the following code in the postopen event for the view I get a “Command is not available” Notes error:

Sub Postopen(Source As Notesuiview)

Dim ws As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim doc As notesdocument



Set ws = New NotesUIWorkspace



Set uidoc = ws.CurrentDocument



Set doc = uidoc.Document

Call source.SelectDocument(doc)

End Sub

If I modify the above code to go in the postopen event of the document, I am unable to get a handle on the uiview (because it is embedded??)

Does anyone have any thoughts on this?

Thanks!! Mike