Extracting emails from multiple outlook folders and placing in one folder


I have a lot of folders in Outlook, and I need to extract all the emails and put them in one folder.

Is there an easier way of doing this than opening each folder and copying / dragging all the contents into the new, single folder?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chris BottomleySoftware Quality Lead EngineerCommented:
Not particularly but, depending on the scope then one option is to drag the root of each folder into the 'new' one and then retrospectively run a macro to move all mails up to the top of that branch then delete the empty sub folders.

We can certainly help with such an activity if macros are suitable.

magnus911Author Commented:
I'm not sure I get what you're saying? Would this dump all the emails from the subfolders into the root folder before deleting the empty folders?
Chris BottomleySoftware Quality Lead EngineerCommented:
More than 1 way on a similar concept but what I suggest is find the lowest level of a branch where you want the mails moving and drag that branch to the 'new' folder.  Repeat for a raft of folders and you have something like:


Now run a sub that moves all the items from
into f1 and then delete the (now empty) sub folders.

This is the following macro which requires you have moved the sub folders across and leave the cursor sitting on that root folder ... f1 in this case.


To Create a macro:

Alt + F11 to open the macro editor

  For User Code:
     Insert | Module to insert a code module into the project
     In the project tree select the module.
     Insert the required macro(s) into the selected module, ('Module1' or similar)

Close the Visual Basic Editor.

Check Security as appropriate:

In the application select Tools | Macro | Security
2003 and Earlier : Select Medium
2007 : Warnings for all Macros
Select OK

To run a macro:

Alt + F8
Select the macro
Select 'Run'

Sub moveup()
Dim fldr As MAPIFolder
Dim subfolder As MAPIFolder
Dim intFolders As Integer

    Set fldr = Application.ActiveExplorer.CurrentFolder
    For intfolder = fldr.folders.count To 1 Step -1
        Set subfolder = fldr.folders(intfolder)
        recurseUp fldr, subfolder
    MsgBox "Done"
End Sub

Sub recurseUp(rootFolder As MAPIFolder, fldr As MAPIFolder)
Dim subfolder As MAPIFolder
Dim itemcount As Integer

    For Each subfolder In fldr.folders
        recurseUp rootFolder, subfolder
    For itemcount = fldr.Items.count To 1 Step -1
        If TypeName(fldr.Items(itemcount)) <> "MAPIFolder" Then
            fldr.Items(itemcount).Move rootFolder
        End If
End Sub

Open in new window

Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

magnus911Author Commented:
looks complicated! Ok thanks, will give it a whirl. It's preferrable to the manual option at least!

Seems silly that there's not an easier way...

Create a new rule. Start from a blank rule.
Check Message when they arrive. Next.
Check on 'through the specified account'
Select account then click ok. (If you have more than 1 email account, select all). Click next
Check on 'move it th the specified folder'
Select folder that you want to place all the emails then click ok. Click finish.
Click Apply.
Click 'Run Rules Now'
Select the new rule you just created
at 'Run in Folder' browse and select 'Inbox'
Check on 'Include subfolders'
Then click on 'Run Now'

All your emails should now be in your selected folder.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Chris BottomleySoftware Quality Lead EngineerCommented:

The author wants to move existing emails within the PST, rules can only be used for newly sent or received mail items.

When you click on 'Run Rules Now', all existing emails will follow the rule currently being run.
Chris BottomleySoftware Quality Lead EngineerCommented:
Agreed but you still have to select each folder in turn, running the rule in this way isn't particularly different to simply dragging them over so I have assumed the asker has nested folders and wants an easy way to group them together.

Always nice to have a choice though ... and to be corrected when you stray from the hard facts which is my error since as you say rules can be run interactively on mails in a folder.

By selecting Inbox in the 'Run in folder' option and then checking all subfolders, all folders will be processed as Inbox is at the topmost folder.
Sorry, should be checking 'Include subfolders'
Chris BottomleySoftware Quality Lead EngineerCommented:
Ah!  I see where you are coming from now ... i've never noticed the include sub folders - it made no sense to me before.  I must consider how useful that can be in other situations.  Many thanks for opening my eyes.

You're most welcomed. :)
Chris BottomleySoftware Quality Lead EngineerCommented:

Where are we on this question, noting that as far as I can see kbphuah's post in http:#30738925 ought to be a good solution.

Alan HardistyCo-OwnerCommented:
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.