Falls es jemanden mal interessiert, wie ichs nun gemacht habe:
Ich bekomme die Collection mittels "UnprocessedDocuments".
Dann hole ich mir noch eine zweite Collection mit allen NotesViewEntries (da UIView.Documents leider auch eine nach Erstelldatum geordnete Collection liefert) per View.AllEntries.
Nun loope ich durch alle Entries durch und vergleiche die UniversalID mit allen UniversalIDs der ersten Collection. In etwa so:
Set dc = Database.UnprocessedDocuments
Set ViewEntryCollection = View.AllEntries
Set ViewEntry = ViewEntryCollection.GetFirstEntry
'loop all entries and export the entry, if there's a corresponding selected doc
While Not (ViewEntry Is Nothing)
Set doc = dc.GetFirstDocument
'in every entry, loop every selected document
While Not (doc Is Nothing)
If doc.UniversalID = ViewEntry.Document.UniversalID Then
'do sth with the document
'count the exported document
EntryPosY = EntryPosY + 1
If EntryPosY >= dc.Count Then
'if all docs have been exported, leave the loop
Goto allDocs
Else
'don't search the remaining docs
Goto nextDoc
End If
End If
'navigate to the next document
Set doc = dc.GetNextDocument(doc)
Wend
nextDoc:
'navigate to the next view-entry
Set ViewEntry = ViewEntryCollection.GetNextEntry(ViewEntry)
Wend
allDocs:
So werden am Ende alle selektierten Docs in der richtigen Reihenfolge abgearbeitet.
Das grosse Problem in diesem Code ist die Performance. Wenn ich eine View mit 4'000 Dokumenten habe und nur das Letzte markiere, muss die Schleife trotzdem durch sämtliche Entries durch, bis sie das besagte Dokument findet.
Aber ich habe bis jetzt keine andere Möglichkeit gefunden, die Sortierung in der View mit den markierten Dokumenten zu übernehmen. ::)
Grüsse
Moritz
P.S. Man möge mir bitte die beiden "Gotos" verzeihen. Die werd' ich später mal eliminieren ;D