Outlook addin- Finding contacts takes very long!!

Add-in Express™ Support Service
That's what is more important than anything else

Outlook addin- Finding contacts takes very long!!
Finding contacts (i use email address) takes very long!! 
Ndayongeje Dieudonne




Posts: 24
Joined: 2010-03-15
Hello everyone!
I have a problem: Finding contacts (i use email address) takes very long!!
The way i do :lookup for a contact with the given email address in contacts folder items from the first item until i reach a match or the end. I check all the three email fields: emailAddress1, emailAddress2 and emailAddress3. This process is much time consuming!!
Is there another effective/optimized way?
Thanks!
Dieudonne
Posted 14 Apr, 2010 10:31:26 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Dieudonne,

Please have a look at http://msdn.microsoft.com/en-us/library/bb220369.aspx.


Andrei Smolin
Add-in Express Team Leader
Posted 14 Apr, 2010 10:40:49 Top
Ndayongeje Dieudonne




Posts: 24
Joined: 2010-03-15
Hi Andrei Smolin,
When looking at Items.Restrict Method.
i found : This method cannot be used and will cause an error with the following properties:
...Email1EntryID, Email2EntryID, Email3EntryID ...

Thanks
Dieudonne
Posted 14 Apr, 2010 11:41:57 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Dieudonne,

Ndayongeje Dieudonne writes:
i found : This method cannot be used and will cause an error with the following properties:
...Email1EntryID, Email2EntryID, Email3EntryID ...


But those properties are EntryIDs, not e-mail addresses...


Andrei Smolin
Add-in Express Team Leader
Posted 14 Apr, 2010 11:55:17 Top
Ndayongeje Dieudonne




Posts: 24
Joined: 2010-03-15
Hi Andrei Smolin,

It was my bug. Those properties were missing because i was using wrong folders.
My list of contact folders was wrong. It was returning almost every folder in outlook!!!
To find contact folder i verified weather folder.AddressBookName is not equal to "",
changing the condition with (folder.AddressBookName != null && folder.AddressBookName != "") solved my problem.
It took 5 to 10 sec!

Thank you again!|
Posted 14 Apr, 2010 13:32:58 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
My congratulations!


Andrei Smolin
Add-in Express Team Leader
Posted 14 Apr, 2010 14:46:45 Top