Hi,
I add an action on a view. This action must act on each selected document in the current view.
The code is rather close to the Notes Manual example.
Here is my test :
I select a doc and run the code : it displays “1”
I select one other doc and run the code : it displays “1”
I select two documents and run the code : it displays … “3” !!
I select 10 documents and run the code : it displays “10” !
Of course, between each test, no doc is selected. It seems the collection is not reset !!
Can somebody help me ?
Ta !
Here is my function :
Sub test(classement As String , texte_classement As String)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Dim workspace As New NotesUIWorkspace
Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments
Set doc = collection.GetFirstDocument()
Messagebox collection.Count
While Not(doc Is Nothing)
doc.ClassementFiche =classement
Call doc.save(True,False)
Set doc = collection.GetNextDocument(doc)
Wend
Call workspace.ViewRefresh
End Sub