Sometimes I have tasks where I should start to work with empty collection of documents. One of my fellow shown me yesterday probably the simplest solutions how we can got empty collection.
Set notesDocumentCollection = notesDatabase.GetProfileDocCollection("WRONG_NAME")
I like this solution and as I see it is perhaps the best one.
p.s. if anybody has better solution I would be happy to see it.
5 comments :
You are doing it the best way...
http://www.bananahome.com/users/bananahome/blog.nsf/d6plinks/PSTL-6UWC7K
That is how I do it as well. However, because you can never truly be certain that WRONG_NAME hasn't been used to create a profile document in the past, it is always a good idea to test for the existence of docs in the collection (profileDocCollection.Count > 0). If the collection has entries, it is a simple matter to remove them.
-Devin.
isnt it from now on something with db.notesdocumentcollection?
sorry, what do you mean?
There is a new method in Notes 8.
NotesDatabase.CreateDocumentCollection
I think this is what quintessens was referring to.
Post a Comment