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 "Doc is something"
Your code seems OK to me....
Maybe it's because it's Friday ; )