Effective February 22, 2024, Google Groups will no longer support new Usenet content. Posting and subscribing will be disallowed, and new content from Usenet peers will not appear. Viewing and searching of historical data will still be supported as it is done today.
Dismiss

Outlook very slow while looping on CurrentFolder.Items collection

12 views
Skip to first unread message

lsicard

unread,
Oct 29, 2009, 1:07:58 PM10/29/09
to
Hi,

I need to check some headers in a mail collection that can be large
(more than 1000 mails per folder) and it seems that when I cast an
item from the collection outlook needs to retreive all related data
(body, attachments) from the remote server (IMAP) which is causing a
severe delay.
My code :
Outlook.Items items = OutlookApp.ActiveExplorer().CurrentFolder.Items;
foreach (object i in items)
{
Outlook.MailItem item = (Outlook.MailItem)i; //This line is slow
//reading/Writing some headers
}

Is there any way to prevent Outlook from calling the server? I just
need to work on the headers...

Thanks in advance

Louis

Dominic Shaw

unread,
Sep 9, 2010, 9:51:42 AM9/9/10
to
Hi Louis,

Did you ever find a resolution to this? I have almost exactly the same circumstance and I can't seem to find a solution.

What did you do in the end?

Thanks,

Dom


> Submitted via EggHeadCafe - Software Developer Portal of Choice
> Scrolling in WPF Toolkit?s Column Chart
> http://www.eggheadcafe.com/tutorials/aspnet/0939d60c-8e17-4a27-b898-1fc772d2d6f6/scrolling-in-wpf-toolkits-column-chart.aspx

Dominic Shaw

unread,
Sep 9, 2010, 9:53:24 AM9/9/10
to
Hi Louis (& all),

Did you ever find a resolution to this? I have almost exactly the same circumstance and I can't seem to find a solution.

What did you do in the end?

Thanks,

Dom

> On Friday, October 30, 2009 5:02 PM lsicard wrote:


>> On Thursday, September 09, 2010 9:51 AM Dominic Shaw wrote:

>> Hi Louis,
>>
>>
>>
>> Did you ever find a resolution to this? I have almost exactly the same circumstance and I can't seem to find a solution.
>>
>>
>>
>> What did you do in the end?
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Dom

>> Submitted via EggHeadCafe - Software Developer Portal of Choice

>> AJAX Web Service Driven Customers Table With Customer Details
>> http://www.eggheadcafe.com/tutorials/aspnet/4c3d2726-d99e-4f83-9e49-0d4867b6271a/ajax-web-service-driven-customers-table-with-customer-details.aspx

Reply all
Reply to author
Forward
0 new messages