Problem with NotesUIView

I have a Embedded view in which I try to put a queryopendocument Event. But when I trigger it, I can’t see my selected document.

Here my code

==========

Sub Queryopendocument(Source As Notesuiview, Continue As Variant)

Continue = False

Dim ws As New NotesUIWorkspace

Dim docCol As NotesDocumentCollection

Dim doc As NotesDocument	

Set docCol = Source.Documents 

Set doc = docCol.GetFirstDocument

=========

My doc variable is empty everytime… I don’t understand why. In debug mode, I can see that my NotesDocumentCollection variable contains 1 document.

plz someone help me.

Subject: problem with NotesUIView

Hi Erik.

Here is some code that works. I couldn’t see a difference with your code:

Sub Queryopendocument(Source As Notesuiview, Continue As Variant)

Continue = False

Dim ws As New NotesUIWorkspace

Dim docCol As NotesDocumentCollection

Dim doc As NotesDocument 

Set docCol = Source.Documents

Set doc = docCol.GetFirstDocument 



If doc Is Nothing Then 

	Msgbox "Nothing"

Else

	Msgbox "Doc is something"

End If

End Sub

Your code seems OK to me…

Maybe it’s because it’s Friday ; )