Determine the next time AutoArchive will run
I’ve got AutoArchive set to run every 14 days. While it indeed does this, in between runs, I sometimes wonder how long it will still take before AutoArchive runs again.
Is there any way to find out the next date and time when AutoArchive will start?
The AutoArchive feature doesn’t reveal it’s next run time but it is not impossible to still work it out.
There are 3 Registry keys which are important to make the calculation.
To make it easier for you, you can download a script which does all the work for you and simply present you with the next date; you just have to double click the script.
This script can also be integrated into Outlook if you want to have it almost like a feature of Outlook itself.
AutoArchive Registry keys
The settings for AutoArchive are stored in the following Registry key:
Here there are 3 value names stored which are important to determine the next AutoArchive date and time:
This value name determines whether AutoArchive is enabled or not. When it is set to 1, it is enabled. When it is set to 0, it is disabled. When it is missing, depending on your Outlook version, it will either prompt you the first time it runs or is disabled.
This value name determines how often AutoArchive should run in with its frequency set in days. When it is missing, it is set to 14 days.
This value name determines the last time AutoArchive ran. Its value is in minutes after January 1, 1601 (the base of which dates are calculated within Windows). When the value is missing, AutoArchive hasn’t ran yet.
The AutoArchive date Calculation
So, when AutoArchive is enabled and you know when it ran last and how often it should run, you can determine the next date and time it should run in the following way:
LastAged + EveryDays * 24 * 60 = next AutoArchive date in minutes since January 1, 1601.
As looking up Registry keys and doing date calculation isn’t everybody’s hobby, feel free to use the NextAutoArchiveTime vbs-script instead.
Within this zip file, you’ll find a file called
NextAutoArchiveTime.vbs. Double click on it to execute it.
This script does the following:
- Start an Outlook process if Outlook isn’t running already to determine your Outlook version.
- Look up the Registry key values mentioned above.
- Calculate the date and time AutoArchive will run next.
- Present the result to you in a dialog box as indicated below.
Quickly find out the next AutoArchive time with a vbs-script.
Note: You can open the vbs-file in Notepad if you want to see or modify the code which will be executed.
If you prefer to have this functionality available to you within Outlook, you can use the NextAutoArchiveTime.bas file which is also included in the zip file to create a macro.
- Download: nextautoarchivetime.zip
- Extract the zip-file.
- Open the VBA Editor in Outlook (keyboard shortcut ALT+F11).
- Import the
NextAutoArchiveTime.basfile via File-> Import…
- Add a button for easy access to the macro.
- Sign your code.
When you execute the macro, Outlook will look up the Registry values, do the calculation for you and present you with the result in a dialog box just like when executing the standalone vbs-script.
As a macro, you can calculate the next AutoArchive time within Outlook.