Search all folders for mail item 
Author Message
 Search all folders for mail item

How would I search through all the folders for a message when the folders
could be several layers deep?

Thanks,

Pete



Sun, 30 Jan 2005 20:15:55 GMT  
 Search all folders for mail item
You would have to use the Folders collection and search in that until
there were no more to search in.

Each MAPIFolder in the Folders collection has its own Folders
collection for subfolders. If there are no subfolders then that
Folders collection would have a .Count property equal to 0. If .Count

Quote:
> 0 then you can get the count of subfolders and search in them. Of

course each subfolder can have its own subfolders so you'd have to
search those collections also.

--
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


Quote:
> How would I search through all the folders for a message when the
folders
> could be several layers deep?

> Thanks,

> Pete



Sun, 30 Jan 2005 21:59:44 GMT  
 Search all folders for mail item
If you're using Outlook 2002 and the folders are all in your Exchange
mailbox or in a single PST file, you also have the option of using the
Search object and a DEEP traversal.

--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
     Microsoft Outlook Programming Jumpstart - coming September 2002
     http://www.slipstick.com/books/jumpstart.htm


Quote:
> How would I search through all the folders for a message when the folders
> could be several layers deep?

> Thanks,

> Pete



Tue, 01 Feb 2005 17:52:44 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. create an e-mail mailing from a folder containing tasks items

2. VB to Search through Public Folder and Delete Item

3. Search item in folder

4. Search item in folder

5. Search item in folder

6. Need Outlook macro to recurse mail folders and print each item

7. Find the currently selected item in a mail folder

8. Using VBScript to search inside an Outlook Mail Item

9. Move Selected Mail Items to Public Folder

10. Need to save a mail item to a public folder when it is sent

11. Turn off Save mail items to Sent Folder

12. Using VBScript to search inside an Outlook Mail Item

 

 
Powered by phpBB® Forum Software