Is it possible to combine two different collections.
I have a master db I would like to display info from two other dbs. I would like to get a Collection from both dbs, combine them, sort, and then write the info out to an RTF with corresponding info and doc links.
I have searched but did not find anything that would point me in the right direction.
Sort of, kind of. You can use a List to imitate a collection. Just define a unique identifier key for each document. Something like this:
Dim doclist List As NotesDocument
Dim dc1 as NotesDocumentCollection
Dim dc2 as NotesDocumentCollection
Dim dockey As String
'Get your two collections then:
Set doc = dc1.GetFirstDocument
Do While Not (doc Is Nothing)
dockey = doc.Whatever(0)
Set doclist( dockey ) = doc
Set doc = dc1.GetNextDocument(doc)
Loop
Set doc = dc2.GetFirstDocument
Do While Not (doc Is Nothing)
dockey = doc.Whatever(0)
Set doclist( dockey ) = doc
Set doc = dc2.GetNextDocument(doc)
Loop
You now have a List of documents. If you generate an array of your doc keys and sort them, you can the work through the List and do what you want with it.
Yes, because the members of the List are the actual NotesDocuments. You can generate links to them as easily as if you were accessing them from a Collection.