Generally, if you would like to disable “AutoArchive” option for all Outlook folders, you have to check the properties of all folders and disable this option one by one. It is pretty cumbersome. So, this article will share you a way to accomplish it in bulk.
Outlook allows us to specify different “AutoArchive” settings for different folders. That is to say, you can enable this feature for some folders and disable it for some others. In this situation, if you wish to disable “AutoArchive” option for all folders, you’ll need to firstly find out the folders with “AutoArchive” option enabled and then disable it one by one. It can be quite tedious and troublesome. So, here we will introduce a method to achieve it in batches.
Batch Disable “AutoArchive” Option for All Folders
- At the very outset, start your Outlook program.
- Then, in the main Outlook window, you can press “Alt + F11” key buttons to access Outlook VBA editor.
- In the subsequent “Microsoft Visual Basic for Applications” window, you have to find and open a module that is not being used.
- Next, copy and paste the following VBA code into this module.
Sub DisableAutoArchiveforAllFolders() Dim objOutlookFile As Outlook.Folder Dim objFolder As Outlook.Folder 'Select a specific Outlook data file Set objOutlookFile = Outlook.Application.Session.PickFolder If Not (objOutlookFile Is Nothing) Then For Each objFolder In objOutlookFile.Folders Call ProcessFolders(objFolder) Next MsgBox "Disable AutoArchive for all Outlook folders!", vbInformation End If End Sub Sub ProcessFolders(ByVal objCurrentFolder As Outlook.Folder) Dim objStorageItem As Outlook.StorageItem Dim objPropertyAccessor As Outlook.propertyAccessor Dim objSubfolder As Outlook.Folder On Error Resume Next Set objStorageItem = objCurrentFolder.GetStorage("IPC.MS.Outlook.AgingProperties", olIdentifyByMessageClass) Set objPropertyAccessor = objStorageItem.propertyAccessor '0 is to disable "AutoArchive" objPropertyAccessor.SetProperty "http://schemas.microsoft.com/mapi/proptag/0x685E0003", 0 objStorageItem.Save 'Process subfolders recursively If objCurrentFolder.Folders.cout > 0 Then For Each objSubfolder In objCurrentFolder.Folders Call ProcessFolders(objSubfolder) Next End If End Sub
- Ultimately, you could try this macro.
- Firstly, run this macro by pressing “F5” key button.
- Then, you will be required to select a specific Outlook data file, shown as the image below:
- After that, the macro will proceed to run.
- Lastly, when the macro completes, you’ll get a prompt.
- Now, you can check all the folders’ Properties. Right click a folder and opt for “Properties” from the context menu. In the popup dialog box, turn to the “AutoArchive” tab, under which you’ll see that “AutoArchive” feature is disabled, like the following screenshot:
Make Regular Backups for Your Outlook
Due to Outlook’s vulnerability, making regular backups is a vital must-have. Once your Outlook is damaged and data gets lost, you could revert to the most recent backups. But if the backup is weeks old or fails to be restored, you have no choice but to take aid of to a more powerful and experienced tool, such as DataNumen Outlook Repair. It is able to fix PST issues like a breeze. Thus, it must be capable of getting back maximum data for you.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including recover Sql Server and outlook repair software products. For more information visit www.datanumen.com