CDO & Outlook-Out of memory, messages collection 
Author Message
 CDO & Outlook-Out of memory, messages collection

Hi,
I have a VB.net Com-Addin project inside Outlook that uses the outlook
object model
and CDO 1.21. When looping through a folder that has hundreds or thousands
of emails,  I run into memory problems. After setting the messages
collection and looping through all the emails, I can not view any of the
other Outlook folders, like the Inbox.

The goal is to try and find all the emails from a specific contact, using
any of the 3 possible contact emails, instead of their name. This would
include emails that the contact email is found in TO or CC or BCC
properties.

Any ideas?  Thanks



Wed, 20 Jul 2005 15:44:33 GMT  
 CDO & Outlook-Out of memory, messages collection
There is a limit of 255 RPC channels per process (each message uses up one).
In .Net you need to trigger the GC every once in a while (100 items?).
An even better solution would *not* to loop through all messages, but to use
Items.Find/FindNext and Items.Restrict.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool


Quote:
> Hi,
> I have a VB.net Com-Addin project inside Outlook that uses the outlook
> object model
> and CDO 1.21. When looping through a folder that has hundreds or thousands
> of emails,  I run into memory problems. After setting the messages
> collection and looping through all the emails, I can not view any of the
> other Outlook folders, like the Inbox.

> The goal is to try and find all the emails from a specific contact, using
> any of the 3 possible contact emails, instead of their name. This would
> include emails that the contact email is found in TO or CC or BCC
> properties.

> Any ideas?  Thanks



Sat, 23 Jul 2005 02:28:01 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Creating a CDO collection from an Outlook collection

2. CDO - Message Object - Fields collection

3. Please help: Active Messaging/CDO Memory Error

4. MAPI, CDO, WinXP & Outlook 2k - Internet Only

5. Outlook Express & CDO

6. MAPI/CDO & Outlook

7. CDO & Outlook

8. CDO vs Outlook 2000 Object Library?? (Outlook Newbie)

9. Read message from Outlook with drag&drop

10. CDO InfoStore Public Folders can not see Fields Collection

11. MAPI/CDO Recipients collections

12. CDO Collection Limit

 

 
Powered by phpBB® Forum Software