выделение нескольких пользователей

  • Автор темы Автор темы makaset
  • Дата начала Дата начала

makaset

Well-known member
14.03.2007
126
0
BIT
0
Привет Всем. из списка выбираю несколько сотрудников но он присваеват только один как можно присовить всех выделенных
то е какой нить цикл

Dim ses As New NotesSession
Dim ws As New NotesUIWorkspace
Dim coll As NotesDocumentCollection
Dim cdoc As NotesDocument
Dim doc As NotesDocument
Dim db As NotesDatabase
Dim picklist As Variant

Set db =ses.CurrentDatabase
Set doc = ws.CurrentDocument.Document
Set coll = ws.PickListCollection(3,True,db.Server,db.File,"adresa","Выбор...","Выберите ")
Set cdoc = coll.GetFirstDocument
If Not cdoc Is Nothing Then
doc.Na=cdoc.Na
doc.FIO=cdoc.FIO
doc.Naim=cdoc.Naim
End If
 
Используйте forall, чтобы обработать всю коллекцию
 
или так, если в документах не мультивалью-поля...
Код:
Dim ses As New NotesSession
Dim ws As New NotesUIWorkspace
Dim coll As NotesDocumentCollection
Dim cdoc As NotesDocument
Dim doc As NotesDocument
Dim db As NotesDatabase
Dim Na as Variant
Dim Fio as Variant
Dim Naim as Variant
dim i as Integer
Set db =ses.CurrentDatabase
Set doc = ws.CurrentDocument.Document
Set coll = ws.PickListCollection(3,True,db.Server,db.FilePath,"adresa","Выбор...","Выберите ")

if coll.Count > 0 then
redim Na(0 to coll.Count-1) as String
redim Na(0 to coll.Count-1) as String
redim Na(0 to coll.Count-1) as String

Set cdoc = coll.GetFirstDocument
Do until cdoc Is Nothing 
Na(i)=cdoc.Na(0)
FIO(i)=cdoc.FIO(0)
Naim(i)=cdoc.Naim(0)
i=i+1
Set cdoc = coll.GetNextDocument(cdoc)
End do

doc.Na=Na
doc.FIO=FIO
doc.Naim=Naim
end if
 
Мы в соцсетях:

Обучение наступательной кибербезопасности в игровой форме. Начать игру!