Link to home
Start Free TrialLog in
Avatar of Michael Graham
Michael GrahamFlag for United States of America

asked on

Need to automate the export of 75 random emails to a new PST

I need to find a way to export a random sampling of over 10k emails. 75 will need to be copied to a new PST. I'm not sure the best way to approach this. If there is a tool or addon that can assist I'd be open to using that. My thought is that this would be able to be scripted as a macro within Outlook but I'm not sure where to start. One potential issue that I have is that I have multiple inboxes attached to my Outlook so I'm not sure how to choose which one. Any help or guidance would be greatly appreciated.
Avatar of Vasil Michev (MVP)
Vasil Michev (MVP)
Flag of Bulgaria image

You'll have to do it manually. While you can script the "random selection" part of it, exporting to PST is a client-side operation that cannot be scripted.
Avatar of Bill Prew
Bill Prew

If you are going to do this from an Outlook macro, then you should be able to create a new PST there.  Take a look at the links below for reference info and an example.  I would expect though that you won't be able to copy (maybe?) or for sure move/delete the new PST after this until Outlook is closed.  That's how it is with PST's, once you open them in an Outlook session even if you close them Outlook holds on to them until it is closed and prevents deletion, etc.


As far as multiple email accounts in the Outlook session that's not a big deal, you can loop over them, etc.  What you really need to define is what do you mean by "random sample" given that there could be multiple accounts, multiple folders and subfolders, the Inbox could be named something else, etc...


»bp
@Vasil,

Are you all set with this now, or do you need more help?  If all set, could you please close it out now.  If you need help with the question close process take a look at:



»bp
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.