CreateDocumentCollection -> Invalid object type for method argument

Hi all,

I build a NotesDocumentCollection from a loop using:

Set dc = db.CreateDocumentCollection 'Create empty document collection

Call dc.AddDocument(doc)

Then I want to compare the documentcollection with all entries in a view. Hey… a new method of NotesViewEntryCollection called Subtract!

So:

Set vec = vw.AllEntries

Call vec.Subtract(dc)

But unfortunataly, a runtime error is raised: “Invalid object type for method argument”

When I create the empty document collection using db.Search({This=“aFakeSearch”}, Nothing, 0), it works fine.

So this seems an issue in the CreateDocumentCollection method.

Bas

Subject: CreateDocumentCollection?

I’m looking in my designer help and do not see a CreateDocumentCollection method of NotesDatabase. However, when I do want to create an empty collection I use the second method you described, using a search that I know will return nothing.

Subject: It’s still undocumented

Hi Paul,

The CreateDocumentCollection is still undocumented. Probably due to issues like this.

Bas