If you’ve enabled “AutoArchive” for a calendar folder but don’t wish recurring items to be auto-archived, you ought to disable “AutoArchive” for such items. Thereby, this article will show you a method to batch realize it with VBA.
To prevent auto-archiving an item, you can select the item and press “Alt + Enter” key to access item’s Properties, in which you can enable “Do not AutoArchive this item” option, as shown in the following image. Now, if you’d like to batch disable “AutoArchive” for all recurring calendar items, obviously, manually process many items one by one is quite tedious and stupid. Therefore, in the followings, we will introduce you a far more efficient way.
Batch Disable “AutoArchive” Option for All Recurring Calendar Items
- To begin with, start your Outlook program.
- Then, get access to VBA editor by referring to “How to Run VBA Code in Your Outlook“.
- Next, put the following VBA code into a module that is not in use.
Sub NotAutoArchiveRecurringCalendarItems() Dim objStore As Outlook.Store Dim objOutlookFile As Outlook.Folder Dim objFolder As Outlook.Folder For Each objStore In Outlook.Application.Session.Stores Set objOutlookFile = objStore.GetRootFolder For Each objFolder In objOutlookFile.Folders 'Process all Calendar folders If objFolder.DefaultItemType = olAppointmentItem Then Call ProcessFolders(objFolder) End If Next Next End Sub Sub ProcessFolders(ByVal objCurFolder As Outlook.Folder) Dim i As Long Dim objAppointment As Outlook.AppointmentItem Dim objSubfolder As Outlook.Folder For i = 1 To objCurFolder.Items.Count Set objAppointment = objCurFolder.Items.Item(i) 'Disable "AutoArchive" for recurring items If objAppointment.IsRecurring = True Then objAppointment.NoAging = True On Error Resume Next objAppointment.Save End If Next 'Process all subfolders recursively If objCurFolder.Folders.Count > 0 Then For Each objSubfolder In objCurFolder.Folders Call ProcessFolders(objSubfolder) Next End If End Sub
- After that, move cursor into the first subroutine.
- Lastly, press “F5” key button or click the “Run” icon in toolbar.
- When macro finishes, you can check the recurring items’ properties. In their “Properties”, “Do not AutoArchive this item” option must be checked.
Guard Precious Outlook Data
You must be unwilling to confront the corruption of your cherished Outlook data. Thus, it is vitally essential for you to make regular data backups for Outlook. Also, you need to master how to use Scanpst to repair PST issues. Last but not least, if affordable, you are better off preparing a robust external PST repair utility, such as DataNumen Outlook Repair. It’s able to fix PST issues and recover PST data with effortless ease and in quick time.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including corrupt sql and outlook repair software products. For more information visit www.datanumen.com