Selective deleting in Outlook 2007

We have a client who uses an IMAP account on Outlook 2007. His .pst is now 20gb and had recently become corrupted. This is fixed but to prevent it happening again, we need to make it smaller.

The only way to do this he approves of is to delete all emails except from 10 or 15 senders in the inbox (other folders can be cleared for everyone).

Preamble:
There are many ways to do this, I am aware, but the reason I am posting this here is because of certain problems associated with them. If we were to filter out all the emails he wants to keep, select-all and delete, it will take a very long time, will be liable to crash, and has no error reporting - I've had experience deleting thousands of items at a time with Outlook and got into trouble more often than I'd like! If we were to do it 500 emails at a time it would be a huge and inconvenient job. We'd run into the same issues moving the keep-emails out of the inbox first.

We are thinking about using a macro. It would need to have good error catching, be optimised to work efficiently i.e. delete the emails in a resource-friendly way, and hopefully report progress and log errors. We could probably make this ourselves but we would still recommend your ideas on this matter.

Obviously we would back up the .pst before doing anything.

So the actual question is - what would you say is the best/fastest/safest way to do this? If you are going to recommend a macro, is there any expert advice about things we may not have thought about to make sure it runs clean? Otherwise, if manually deleting 500 at a time is the way to go then so be it.

A general advice question really.

Really appreciate it and so far very much enjoying my time on this forum!

Thanks all,
Leo
leo135Asked:
Who is Participating?

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

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

David Johnson, CD, MVPOwnerCommented:
IMAP data resides on the server and a copy is on the client. if you have access to the server do it there otherwise..  archive the users to keep and then delete everything.. he will still have the needed users mail in the archive pst.
Phil CoulsonCommented:
hey there,

I totally agree with David here. You can archive your PST and split it into parts preventing your data form actually being deleting.
For further assistance you can also look up to this following blog as well: http://blog.systoolsgroup.com/split-pst-files-by-emails.html 

Regards
Phil
leo135Author Commented:
Very grateful for the answers but unfortunately this is only a last resort. I already know how to do what you suggest, but this question is about how to delete all but emails from certain people.

Doing it on the server is unnecessary as the problem isn't how long it will take for him, but how long it will take for us doing it. Also, we don't want to slow the server - isn't fast anyway :)
David Johnson, CD, MVPOwnerCommented:
doing it on the server is the fastest way and will not disrupt the server.. doing it on the client and then syncing with the server involves a lot more overhead. once the user has archived what he needs into a  separate .pst file, you can delete the mailbox, and re-create it. and then import the pst into the mailbox. 5-10 minutes tops once you have the archive.pst

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

From novice to tech pro — start learning today.