Domino 9 und frühere Versionen > Entwicklung

Angewählte Dokumente einer Ansicht

(1/2) > >>

Don Pasquale:
Hallo Leute,


ich möchte die angewählten Dokumente einer Ansicht mehrmals bearbeite, deswegen möchte ich sie in eine Collection packen.

Leider ist folgende Collection immer leer.

Wer weiss wieso?


Ciao
Don Pasquale

Sub Queryaddtofolder(Source As Notesuiview, Target As Variant, Continue As Variant)
   
   Dim uiws As New NotesUIWorkspace
   Dim uiview As NotesUIView
   Dim session As New NotesSession
   Dim db As NotesDatabase
   Dim doc As NotesDocument
   Set uidb = uiws.CurrentDatabase
   Set uiview = uiws.CurrentView
   Set db = session.CurrentDatabase
   
   
   Set dc = db.UnprocessedDocuments      ' ...alle markierten Dokumente
   Set doc = dc.GetFirstDocument 'das erste Dokument    
   Print ("Anzahl " & dc.Count)
   While Not doc Is Nothing
      Messagebox ( doc.e4fld_Identnummer(0) & " ist " & doc.e4fld_Ausgecheckt(0) )
      Set doc = dc.GetNextDocument( doc ) 'das nächste Dokument       
   Wend

Till_21:
hol dir die docs ueber "uiview.documents" nicht ueber "db.unprocesseddocuments"

gruss

Axel:
@Till_21

Das gibt aber alle Dokumente und nicht nur die markierten.


Axel




Don Pasquale:
Ich hab es jetzt hiermit probiert,
das scheint erfolg zu haben


For k = 1 To Source.Documents.Count
Set doc = Source.Documents.GetNthDocument(j)
 ' mach irgendwas mit Docuemtn

Next k

forrest g:
hallo don pasquale,

...aus der hilfe...

This method is valid only for agent or view action scripts and may be invoked only on NotesDatabase objects obtained from the CurrentDatabase property in NotesSession. In scripts that are not a part of an agent or view action, this method returns a NotesDocumentCollection with zero documents. When invoked on a NotesDatabase object that was not obtained from the CurrentDatabase property, this method raises an error.

...du must hier über notessession ran und hast keinen view gewählt...
also vorher:

tschö
Set notesView  = db.GetView( viewName$ )

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln