A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Cycle through all folders under Mailbox



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old February 18th 09, 04:02 PM posted to microsoft.public.outlook.program_vba
Jeremy
external usenet poster
 
Posts: 28
Default Cycle through all folders under Mailbox

Hi,

I would like to cycle through every folder in my mailbox and I have the
following code. However, i don't think this code will cycle through all
folders, I think it just cycles through those under my inbox. I don't think
the macro will cycle through folders located under .pst archives, or other
mailboxes that I have access to under my mailbox.

Is there a way a cycling through all folders, including those under other
mailboxes and archives?

My current macro is as follows:

Sub ProcessAllFolders()
ProcessSubFolder Application.ActiveExplorer.CurrentFolder
MsgBox "All Done!", vbInformation + vbOKOnly, "Process All Folders Macro"
End Sub

Sub ProcessSubFolder(olkFolder As Outlook.MAPIFolder)
Dim olkSubFolder As Outlook.MAPIFolder

'insert some code here to do something

For Each olkSubFolder In olkFolder.Folders
ProcessSubFolder olkSubFolder
Next
Set olkSubFolder = Nothing
End Sub

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set up a 6 day school cycle in outlook pocono24 Outlook - Calandaring 5 January 5th 08 03:09 PM
Cannot see all folders of shared Mailbox [email protected] Outlook - General Queries 2 October 18th 07 06:30 PM
Can Outlook b-set up 2automatically input a 6 day school cycle dvaar Outlook - Calandaring 1 March 11th 07 11:28 PM
Custome Recurrence Cycle? Dan Merkel Outlook - General Queries 3 August 8th 06 03:19 PM
Loop through all folders in a mailbox Bob Smith Outlook and VBA 4 May 26th 06 12:23 AM


All times are GMT +1. The time now is 08:41 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.