Programmatically Selecting Multiple Items

  • Thread starter Thread starter Norm
  • Start date Start date
N

Norm

I want to programmatically select all of the items in a mail folder. Can this be done?
In particular, I want to automate the process I now do manually wherein I select all of
the mail items in a folder and save them to one, big, text file.
 
If you want to process all the items in the folder, why do you need to
select them all? Just iterate the folder's Items collection.
 
Sue Mosher said:
If you want to process all the items in the folder, why do you need to
select them all? Just iterate the folder's Items collection.

When I do this mannually, all the messages get saved to one text file with the From, To,
Date, Subject, and body data nicely organized in one giant text file. I've included a
sample below. If I perform an itteration, I'd have to save each to a temp text file and
the programatically add the contents of the temp file to the object text file. This seems
very inelegant.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers


From: Darren
Sent: Saturday, February 07, 2004 10:45 AM
To: street
Subject: Dirig

Hey who's up for a feild trip in March to the above mentioned? It's
a wicked good time.
darren



From: Sabine
Sent: Friday, February 06, 2004 8:59 PM
To: street
Subject: RE: Dirig

Thanks Mike, but it is unlikely that I will be making it since I
committed to some volunteer activities this weekend and have to go to
NH.

By the way, the only way I would feel out of place is if there was no
beer!

Have fun!
 
Inelegant it may be, but that's the correct technique.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Thanks for you help. When I attempt to save each MailItem, a dialog box appears asking me
if I want to allow access to the item. How do I disable this from happening?
 
See http://www.outlookcode.com/d/sec.htm for your options with regard to the
"object model guard" security in Outlook 2000 SP2 and later versions.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top