How do retention policies work with .pst files?

Status
Not open for further replies.

kmfdm

Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Hello,

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

kmfdm

Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
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 only...so if I do end up exporting to a .pst, the emails are safe and will not be affected by the retention policy, correct?
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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.
 

kmfdm

Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
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?
 

kmfdm

Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
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.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Does it work if you use a different path, like my documents?
 

kmfdm

Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
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.
 

kmfdm

Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
I changed it to a test folder in My Documents and it worked now. Strange.

All set now...thanks for the help!
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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?
 
Status
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 Outlook.com 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
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 Outlook.com 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 Outlook.com accounts in Outlook 1
D Can Exchange Admin Center create a pst for users email/contacts/calendar? Exchange Server Administration 0
S What's in a PST file? Using Outlook 1
N VBA to delete duplicates by message-id on common pst for 2 or more emails Outlook VBA and Custom Forms 0
F Copy and replace not update contact in another pst Using Outlook 0
T Cannot remove needless PST Using Outlook 1
N pst files are recreating automaticaly and cannot be deleted Using Outlook 5
C Export NSF Lotus Notes files in Outlook PST format? Using Outlook 1
glnz How set up new IMAP on Outlook-Office 365 and merge in pst from Outlook 2003 for same two email accounts? Using Outlook 5
L What are the risks of opening an Outlook 2016 .pst file in Outlook 2010? Using Outlook 4
abnet Advice required re backing up .ost and .pst files Using Outlook 7
RBLampert Assigning a newly (re)created e-mail account to a specific .pst data file Using Outlook 2
N Two .pst files on one computer both with contacts? Using Outlook 9
DariTrevino MIcrosoft Outlook PST file cannot repair Using Outlook 1
E Exporting email (.pst) Using Outlook 8
R PST->Outlook.com (Import vs Drag-n-Drop methods Using Outlook.com accounts in Outlook 2
P how to remove unwanted PST file default categories assigned to many calendar entries Using Outlook 7
S Add Exchange Account as Secondary to Existing PST? Exchange Server Administration 1
semnaitik Archive PST is not empty but can't see old emails Using Outlook 2
B What is best IMAP .OST file to .PST file converter solutions? Using Outlook 1
O Using .OST and .PST mail thru different providers Using Outlook 5
I Convert POP3 account (PST) to IMAP (.OST) Using Outlook 3
semnaitik Is it possible to recover content from a 0KB PST file? Using Outlook 3
K Outlook Archive to PST Files by Date Range VBA Script? Outlook VBA and Custom Forms 1
katehawkins Outlook 2013 Ost to pst conversion problem Using Outlook 1
E How to transform .OST in .PST ? Using Outlook 1
O Any decent tool to compare .pst files? Using Outlook 2
R How To Repair OST File & Export OST File to Outlook PST ? Using Outlook 3

Similar threads

Top