Hi, Does anyone know how to write the script (What method to use)for document selection in NotesUIView? I meant in a View, without making the “check” mark in the selection bar but just focus (click) on the specific document in the view, and we can get the data in the specified document. I have tried to use the script below:
Set uivw=ws.CurrentView
Set dc=uivw.documents
Set doc=dc.getfirstdocument
If not doc is nothing then
Name$=doc.Name(0)
End if
I realize that using the above method, without making the “check” mark on the selection bar in the view, it treats doc is nothing and jump out from the if…loop. What I need is by focusing the mouse click on the document in the view, I’m able to get the document.
Can anyone please help? Thank you
Subject: Use UnprocessedDocuments from the db class…
This will return one or more documents if the agent is set to run on selected documents. You won’t need the UiView object at all.
Dim s as New NotesSession
Set db = s.CurrentDatabase
Set dc = db.UnprocessedDocuments
Set doc = dc.GetFirstDocument
and so forth…
Look in the help for specifics of this property.
Subject: Document Selection in View, Please Help !
Its all in the notesdocumentation, check the web references listed below.
MARGIN SELECTION ONLY DOES NOT INCLUDE HIGHTLIGHTED DOCUMENT
(ref: http://www-12.lotus.com/ldd/doc/domino_notes/6.5m2/help65_designer.nsf/f4b82fbb75e942a6852566ac0037f284/d9edba881f8baf6985256d42005130ff?OpenDocument
Set dc = uivw.Documents
SELECTION/HIGHLIGHTED DOCUMENT
(BLACK LINE AROUND DOCUMENT IN VIEW)
(REF: http://www-12.lotus.com/ldd/doc/domino_notes/6.5m2/help65_designer.nsf/f4b82fbb75e942a6852566ac0037f284/9bd8324f477df7b585256d42005130e9?OpenDocument)
NOTEID$ = uivw.CaretNoteID
EXAMPLE:
Set db = s.CurrentDatabase
noteid$ = uivw.CaretNoteID
if Not (noteid$ = “”) then
Set doc = db.GetDocumentbyID(noteid$)
end if