How do retention policies work with .pst files?

Not open for further replies.


Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server

I have a very strict retention policy (60 days) and I am trying to archive emails past that point. I can copy .msg files to a local fiolder, but I have no way of sorting by received date then.

If I export the emails to a local .pst file, is that file still affected by the retention policy? Meaning, is the retnetion plocy still tied to the individual email after it is exported as part of a .pst?

or will I open the .pst file 6 months form now and see all the email be removed?

Thanks, that is very helpful. I'm going to try out that VBA tonight.

Just so I'm understanding you correctly, though - you stated that retention is exchange server mailboxes if I do end up exporting to a .pst, the emails are safe and will not be affected by the retention policy, correct?
Correct. When the mail is moved to the pst, the policy does not apply - the policy feature looks only in the mailbox, it can't see what is in the pst.
I added the code and I can't get it to work. I tried both adding a new module and adding it to ThisOutlookSession.

I get a runtime error: "Operation Failed"

Debug points to this line: oMail.SaveAs sPath & sName, olMSG

I didn't know if the path was correct, so I then tried to set the path to "C:\Temp". The new error was "You don't have permissions to perform this action".

I checked tried this with various settings under Macro Security - no change. What am I missing here?
Since this is now a programming issue and the programming forums here appear to be closed, I posted the question in the Outlook MSDN forums. Hopefully I can figure it out.
Does it work if you use a different path, like my documents?
Thanks for the reply. I tried that as well, since the code as written (using "Documents" instead of "My Documents") didn't seem to work with WinXP.

Neither way worked.
I changed it to a test folder in My Documents and it worked now. Strange.

All set now...thanks for the help!
Yeah, that could be a problem since My Documents is in a different path. I'll check it on a Windows xp system.

I have to put together a winxp/2007 virtual machine, but on winxp/2010, using the code on the webpage, exactly as written but changing the sPath to
sPath = enviro & "\My Documents\"

works here. It *should* work in 2007 too.

If i use a path that does not exist, i get this:

Run-time error '-2147287037 (80030003)':

The operation failed.

In the VBA editor, press Ctrl+G to open the Immediate window. If there isn't anything shown, run the macro. The Debug.Print sPath & sName line creates this list of files, one for each selected message or for the first message, if the macro fails on the path. Does the path exist?
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
I Retention policies on outlook 2016 ribbon Using Outlook 2
G Retention Policy for Deleted Items folder Using Outlook 0
R Retention periods and Deleted Items Using Outlook 7
N Outlook dialog about retention policy Using Outlook 3
M Microsoft SW Licencing policies BCM (Business Contact Manager) 2
T Cannot open .pst file Using Outlook 0
macdotcom Outlook 365 Outlook folder export to PST archival tool - close, but need a nudge Outlook VBA and Custom Forms 2
B How to get PST folder datetime? Outlook VBA and Custom Forms 1
Rob Can't save MailItem because the message changed in .pst file Outlook VBA and Custom Forms 0
P Recommendation for PST repair program Using Outlook 1
P Outlook 365 Bad experience with KernelAPPS PST Repair program Using Outlook 0
HarvMan Importing PST into IMAP account Using Outlook 12
K Moved pst to new computer, now Gmail not coming into Outlook Using Outlook 7
W Outlook 365 File access denied attempting to import .pst Using Outlook 6
P Copying ALL calendar entries from Calender in PST file to IMAP OST file? Using Outlook 1
S Import PST to Office 365 Using Outlook 1
J Recover server side rules from OST/PST without access to the server Using Outlook 2
D Outlook app 2021 & iCloud PST issues Using Outlook 2
L Restoring Outlook from backup pst file Using Outlook 5
e_a_g_l_e_p_i Kernel Outlook .pst viewer Using Outlook 3
G Outlook Express (DBX) to Outlook (PST) Conversion Software Wanted Using Outlook 1
J Outlook 2003 .pst Will Not Restore Completely to Outlook 2019 Using Outlook 5
J SCANPST errors Outlook PST repair? Using Outlook 1
HarvMan Exporting IMAP OST file to PST Using Outlook 5
J What are .PST.db and .PST.db.journal Files? Using Outlook 2
Abraham Outlook 2013 Lost my folders when moving from PST to IMAP Using Outlook 11
L Article on merging pst file Using Outlook 1
e_a_g_l_e_p_i Changing where data .pst is saved to Using Outlook 3
M Convertor for Outlook Express Mail Store (.dbx) to Outlook Mail Store (.pst) Using Outlook 0
D a general question re how backup programs handle pst files ... I have no problems, just curious Using Outlook 1
R Problem moving file “Email folders.pst” to new PC Using Outlook 5
J Outlook 2019 i dont want to buy the snake oil ost to pst programs Using Outlook 1
D Outlook 2016 Unable to load Outlook data pst file Using Outlook 5
K Need to convert .mmf file to .pst format Outlook VBA and Custom Forms 7
J outlook 2007 doesn't let me choose which .pst to search Using Outlook 2
B Can I create a local PST file for SPAM on a drive that is usually disconnected? Using Outlook 3
P Outlook pst file is too huge with POP3. How to save more space? Using Outlook 4
K Disabling import/export button to restrict PST creation Using Outlook 3
K Export Folder to PST Outlook VBA and Custom Forms 2
I Outlook 365 - import/attach PST file that used POP3 Using accounts in Outlook 0
HarvMan Outlook 365 PST Report Using Outlook 1
P PST file is getting huge under POP 3 Using Outlook 2
M Export-Import .pst file problems Using Outlook 2
L Cannot open PST file for first session each day Using Outlook 6
David in Mississippi New (Feb 2020) install of Outlook 365 - Cannot specify PST for different accounts Using Outlook 0
GregS Outlook 2016 OST thinks it is PST? Using Outlook 1
N .pst archive from work will not open/import on Microsoft 365 Exchange Server Administration 0
M PST import from Outlook 2007 to 2010 - Address Book contacts all in 1 group Using Outlook 4
J Export Zimbra to Outlook PST Using accounts in Outlook 1
D Can Exchange Admin Center create a pst for users email/contacts/calendar? Exchange Server Administration 0

Similar threads