search speed

F

flagisup

I inherited a vb6 program along with outlook 2000 that
uses the com add in to retrieve folders and to create new
folders in a directory. The current search takes about a
minute to complete and the user would like to see 10
seconds. Is there a better algorithm I could use to speed
up the current search. The current code is

Dim ClaimsEmailsPublicFolder As MAPIFolder
Set ClaimsEmailsPublicFolder = OL.GetNamespace
("MAPI").Folders("Public Folders").Folders("All Public
Folders").Folders("Departments").Folders("Claims").Folders
("Claims Emails")

*** The above sets the main folder to search

*** below will show the folders within the above

Dim ClaimNumberFolder As MAPIFolder

Set ClaimNumberFolder = ClaimsEmailsPublicFolder.Folders
(Folderlookingfor)

thanks
 
Top