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?

AutoArchive Settings buttonThe 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:
HKEY_CURRENT_USER\Software\Microsoft\Office\<version>\Outlook\Preferences

Here there are 3 value names stored which are important to determine the next AutoArchive date and time:

  • DoAging
    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.
  • EveryDays
    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.
  • LastAged
    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

Calculator buttonSo, 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.

NextAutoArchiveTime vbs-script

As looking up Registry keys and doing date calculation isn’t everybody’s hobby, feel free to use the NextAutoArchiveTime vbs-script instead.

Download: nextautoarchivetime.zip

Within this zip file, you’ll find a file called NextAutoArchiveTime.vbs. Double click on it to execute it.

This script does the following:

  1. Start an Outlook process if Outlook isn’t running already to determine your Outlook version.
  2. Look up the Registry key values mentioned above.
  3. Calculate the date and time AutoArchive will run next.
  4. Present the result to you in a dialog box as indicated below.

Quickly find out the next AutoArchive time with a vbs-script.
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.

NextAutoArchiveTime macro

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.

  1. Download: nextautoarchivetime.zip
  2. Extract the zip-file.
  3. Open the VBA Editor in Outlook (keyboard shortcut ALT+F11).
  4. Import the NextAutoArchiveTime.bas file via File-> Import… 
  5. Add a button for easy access to the macro.
  6. 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.
As a macro, you can calculate the next AutoArchive time within Outlook.

Sperry Software
Use "BH93RF24" to get a discount when ordering!