
Creating a CDO collection from an Outlook collection
You can't do that. The collection you get exists only in your Outlook
collection object. You can get the entire collection in CDO and then
use the MessageFilter object of the collection to restrict it to the
items you want.
The only other way would be to iterate over the entire Outlook
restricted collection, get each item and it's EntryID, get the item as
a CDO item and then add it to a Collection object. Not very practical
and it would take a heck of a lot longer than just using a CDO
MessageFilter on the entire CDO collection.
--
Ken Slovak
[MVP - Outlook]
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Co-author of "Programming Microsoft Outlook 2000", Chapters 8-13,
Appendices, Sams
Quote:
> I don't want to get a CDO collection of all folder messages but only
from
> those after a (Outlook) Restrict call.
> Set objSelection = objFolder.Items.Restrict("[myField] = '123'")
> ' create here a CDO collection from the Outlook object
"objSelection"
> (but how...)
> Gerwin.