How can I check, is current document Selected?

Hi! Can anybody help me please? How can I check, is current document Selected, when I copy a view? For example, I can check, is it document or not(Dim vw_ent As NotesViewEntry

Dim vw_ecol As NotesViewNavigator

Set col = db.UnprocessedDocuments

'-----------------------------------------

Set vw_ent = vw_ecol.GetFirst

IF vw_ent.IsDOCUMENT THEN <—I mean this string

). So, it is possible to check the similar way is it Selected(Does the “col” include a document?) or not?

Subject: uiview.CaretNoteID

If you have a UI view and you are running an agent, you may need to cycle through your document collection and compare the CaretNoteID with the NoteIDs in your collection.

If you just want to make sure it is always part of the collection, you can grab the document and use the AddDocument to add it to the collection.