Retrieve all MessageClasses in a folder

  • Thread starter Thread starter =?ISO-8859-1?Q?Bj=F6rn_Kr=FCger?=
  • Start date Start date
?

=?ISO-8859-1?Q?Bj=F6rn_Kr=FCger?=

Hi NG,

how do I retrieve all messageclasses contained in a folder using the
Outlook Object Model?
Since now I read all items and saved its messageclass to a list.
But this is too slow for folders with many items (10000 or more).

Is there a possibility to do this?


Thank you for any answer!

Kind regards,
Björn
 
To get more speed use CDO 1.21 or Extended MAPI. The Outlook object
model is too slow when iterating collections that large.

CDO would give you an order of magnitude speed increase but is an
optional installation with Outlook 2000 or later. Extended MAPI can
only be programmed using C++ or Delphi.

To speed up using the Outlook object model you could try using the
Items.SetColumns "MessageClass" method and use ResetColumns after the
loop but it wouldn't help as much as using CDO or Extended MAPI.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm
 
Hi Ken,

sorry, I did not mean to speed it up, I want a list of all
messageclasses contained in a folder. Is this possible without an iteration?

Regards
Björn


To get more speed [...]
--
Ken Slovak
Hi NG,

how do I retrieve all messageclasses contained in a folder using the
Outlook Object Model?
Since now I read all items and saved its messageclass to a list.
But this is too slow for folders with many items (10000 or more).

Is there a possibility to do this?


Thank you for any answer!

Kind regards,
Björn
 
Back
Top