HOWTO: Change the Aging Properties on a Folder

ID: Q194955

The information in this article applies to:

SUMMARY

The Aging Properties determine the length of time an item will stay in a particular folder before it is archived. The two properties that can be set to control this are PR_AGING_PERIOD and PR_AGING_GRANULARITY.

PR_AGING_PERIOD contains a number that indicates the number of units to set. PR_AGING_GRANULARITY contains a constant indicating the units for the period. For example, if you want to set the length of time to 14 days, you would set the PR_AGING_PERIOD to 14 and the PR_AGING_GRANULARITY to 2 (representing days; see below for a list of the constants).

Here are the define statements for the properties and the constants:

   #define PR_AGING_PERIOD         PROP_TAG(PT_LONG,0x36EC)
   #define PR_AGING_GRANULARITY    PROP_TAG(PT_LONG,0x36EE)

   #define AG_MONTHS  0
   #define AG_WEEKS   1
   #define AG_DAYS    2

MORE INFORMATION

The code below demonstrates how to set the aging properties on the Inbox Folder. It is important to remember to enable archiving on the Inbox folder in order for these property changes to take effect.

This sample depends on the file RulesCls.dll, which can be built from source files included on the Microsoft Platform SDK (Software Development Kit).

The additional libraries required to make the code compile are:

Additional query words:
Keywords          : kbnokeyword kbMsg kbMAPI100 
Version           : WINDOWS:1.0
Platform          : WINDOWS
Issue type        : kbhowto

Last Reviewed: November 1, 1998