logo
search
Others

How to Reset Outlook VBA Code and Stop Folder Counts

Kushani NimanthikaKushani Nimanthika Oct 1, 2026 869 views

Question details

The user needs to stop Outlook from displaying item counts for every folder caused by a VBA macro, and wants to learn how to access the editor to reset or remove the code.

How to Reset Outlook VBA Code and Stop Folder Counts
Product
Microsoft Outlook
Device & OS
not provided
Scenario
Managing Outlook folders and troubleshooting unwanted item counts after adding or modifying a VBA macro.
Observed behavior
Outlook displays item counts for every folder automatically due to an active VBA macro running in the background.
Before you start

Before editing your VBA code, verify that you have the necessary administrative permissions to modify macro settings in Outlook and temporarily disable any running scripts.

Solution 1Recommended

Remove or Comment Out the Unwanted Macro in Visual Basic Editor

Access the Visual Basic Editor to manually disable or delete the specific macro responsible for the automated folder counts.

This is the most direct method to stop unwanted behavior caused by custom scripts in Outlook. By commenting out the code, you preserve it for future reference without allowing it to run.

1
Open Visual Basic Editor

Launch Outlook and press Alt+F11 on your keyboard to open the Visual Basic Editor.

2
Review VBA Settings

Navigate to Tools > Options in the top menu bar to review your current VBA editor environment settings.

3
Locate the Macro

Look through the Project Explorer pane on the left to find the module or script that contains the folder-counting macro.

4
Disable or Delete Code

Select the macro code and either delete it entirely, or type an apostrophe (') at the beginning of each line to comment it out and prevent it from executing.

5
Save and Restart

Save your changes in the editor, close the Visual Basic window, and restart Outlook to apply the updates.

Remove or Comment Out the Unwanted Macro in Visual Basic Editor
Macro Security: Always ensure your macro security settings are configured to only enable macros from trusted sources.
Free Microsoft Office alternative

Looking for a Lightweight Alternative to Microsoft Office?

While WPS Office does not include an email client like Outlook to manage VBA folder counts, it provides a powerful, free, and lightweight alternative to Word, Excel, and PowerPoint for all your document creation needs with seamless migration.

  1. 1. Download WPS Office: Visit the official WPS Office website and download the free installer.
  2. 2. Install the Suite: Run the installation file and follow the quick setup wizard to install the software.
  3. 3. Open and Edit Files: Launch WPS Office and open your existing Microsoft Office files with full format compatibility.
Free, lightweight, and complete office suiteHigh compatibility with Microsoft Word, Excel, and PowerPoint formatsEasily share your documents directly via your preferred email clientFamiliar tabbed UI allows for seamless migration from Microsoft Office
microsoft office alternative - wps office

Frequently Asked Questions

Why does Outlook display item counts next to my folders?

Outlook displays item counts when a default setting is changed or a custom VBA macro is configured to automatically modify folder properties to show the total or unread number of items.

How do I access the Visual Basic Editor in Outlook?

You can access the Visual Basic Editor by opening the Outlook application and pressing the Alt and F11 keys simultaneously on your keyboard.

Is it safe to delete VBA macros in Outlook?

Yes, it is safe to delete custom VBA macros that you no longer need or that are causing unwanted interface changes. However, you should ensure you are not deleting essential organizational scripts provided by your IT department.