Thursday, August 09, 2018

Show Column in Outlook With Email Purge Date

If you're running Outlook in an Exchange environment, and the administrator has defined a Retention Policy, you can use the following kludge to configure Outlook to display a column of dates that the emails will be deleted on.  It's a kludge because the configuration doesn't actually retrieve the Retention Policy from Exchange -- it's up to you to find out what it is and then add it to the configuration.

Select your Inbox and then right click on the message list header and select Field Chooser.


Click the down arrow next to Frequently-used fields and scroll down to User-defined fields in folder.

Click New... and then enter PurgeOn in the Name box, and scroll down the Type box and select Formula.

Enter in the Formula box the DateAdd function that will return a date that's X number of days or months after the message Received date.  For example, if the Retention Policy is 18 months, enter this into the box: DateAdd("m",18,[Received]).  (The first parameter "m" specifies "Month" as the interval.  The number in the second parameter defines the number of intervals, or months in this case.  The third parameter represents the each message's received date.) Then click OK.



Drag the new PurgeOn field that you just created to the header in the position that you'd like the column to appear.


Close Field Chooser and resize the columns so that the dates in the new PurgeOn field display properly.


Note that the dates in the PURGEON column are 18 months later than the dates in the received column.

Unfortunately it seems that each folder (Inbox, Sent Items, etc.) requires its own User Defined Field. The [Received] field is appropriate for use in the Inbox. You might use DateAdd("m",18,[Sent]) in the Sent Items folder.

Again, this is a kludge. If an administrator changes the Retention Policy on the Exchange Server, your new field will ignore the change and blithely continue to show dates based on the old policy.  It may be possible to write a VBA procedure that would run on startup, retrieve the Retention Policy from Exchange and define the PurgeOn field programmatically.  Let me know if you get that working!


A subset of this solution appeared on Microsoft TechNet on 2018-08-09.

No comments: