How to get selected documents in view using LotusScript

There’s a view with some documents in it and I need to move documents selected from this view to a folder while click-N-drag-ing using Lotus Script. If I want the document to be dragged-n-dropped to some folder dynamically. How can it be achieved.I have been using a frameset with 3 frames with folders listed in left frame as outlines and the view in the bottom frame.

Subject: How to get selected documents in view using LotusScript

make an Agent with the target “All selected Documents”.

To get the selected docs run the agent with this code:

Dim session As New Notessession

Dim db As NotesDatabase

Dim col As NotesDocumentCollection

Dim doc As NotesDocument

Set db = session.currentdatabase

'get the selected docs

Set col = db. UnprocessedDocuments

If col Is Nothing Then

Msgbox "none docs selected"

Exit Sub

End If

now you have a doccollection that you can handle

Set doc = col.Getfirstdocument

While Not (doc Is Nothing)

'do anything with the doc

Set doc = col.Getnextdocument(doc)

Wend

'or with the complete collection

call col.putallinfolder(foldername)

hope it helps

bb