Quick way to delete all the items in a folder

T

Tim

I'm running into a performance issue trying to delete 100s of contact items
in a folder. I'm using the following code iternating backwards through the
items as recommended:

AllItems = oFolder.Items

' Loop through the items in the current folder. Looping through backwards in
case items are to be deleted, as this is the proper way to delete items in a
collection.

For i = ofolder.Items.Count To 1 Step -1

AllItems(i).Delete()

Next



However I was wondering if there is a faster way than the above method? I
looked for and couldn't find a way to delete all members of a collection.

Any ideas?

Tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top