Domino 9 und frühere Versionen > Entwicklung
auf markierte Dokumente per Skript zugreifen
(1/1)
Obrac:
Morgen,
ich habe eine wahrscheinlich banale Frage. Wie greift man via Lotus Skript auf in einer Ansicht ausgewählte Dokumente zu? Ich möchte die Felder der ausgewählten Dokumente auslesen und die Inhalte mehrerer Dokumente per Mail verschicken. Ich habe in diesem Zusammenhang schonmal den Begriff "Document-Collection" gehört. Kann mir jemand helfen? Hat jemand vielleicht ein Beispielskript?
/Nadja
Axel:
Hi,
so geht's:
...
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
'Zugriif auf markierte Doks in der Ansicht
Set collection = db.UnprocessedDocuments
'Erstes Dokument
Set doc = collection.GetFirstDocument
While Not (doc Is Nothing)
'Tu was mit dem Dokument
'Nächstes Dokument
Set doc = collection.GetNextDocument(doc)
Wend
...
Axel
Centaury:
Hallo!
Ich denke mal, du willst das ganze in einem Agenten lösen.
Den lässt du nach "ausgewählten Dokumenten" suchen.
Auszug Notes Hilfe:
--- Zitat ---UnprocessedDocuments property
Read-only. The documents in a database that the current agent or view action considers to be "unprocessed." The type of agent determines which documents are considered unprocessed.
Hinweis This property is not implemented in COM.
Defined in
NotesDatabase
Data type
NotesDocumentCollection
Syntax
To get: Set notesDocumentCollection = notesDatabase.UnprocessedDocuments
--- Ende Zitat ---
Das Script sähe dann so aus:
--- Code: ---Dim ses As New NotesSession
Dim db As New NotesDatabase
Dim col As DocumentCollection
Set db = ses.CurrentDatabase
Set col = db.UnprocessedDocuments
--- Ende Code ---
In der Collection col sind dann alle ausgewählten Dokumente!
Centaury:
;D
Wir meinen das Gleiche...
Obrac:
Alles klar, danke erstmal, ich werds alsbald ausprobieren.
Navigation
[0] Themen-Index
Zur normalen Ansicht wechseln