Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
Hello, NormanRockwell1
Thank you for reaching out Microsoft Community. I am an advisor that can provide help regarding Microsoft Office 365 concerns. I totally understand that you wish to reset your Outlook 365 Visual Basic editor and set it to default or normal status. Let me help you with it.
To reset the Outlook 365 Visual Basic Editor;
Open Outlook 365 > press ALT + F11 to open Visual Basic editor. From there, go to the menu and select Tools > select Options.
Look for the Reset option under the Option dialog box. Select it and click "Okay" to apply the changes.
If you wish to reset VBA not show any email count in each folder, please do these steps:
On your VBA editor, Locate the module or script that contains the code for showing email counts in each folder. Delete or comment out the code responsible for displaying the email counts. You can comment out a line of code by adding a single quote ( ' ) at the beginning of the line. Save your changes and close the VBA editor.
Lastly, Here's the code to show email count in each folder. Please copy and save it in your notes or Outlook draft.
Sub ShowEmailCount() Dim objFolder As Outlook.Folder Dim objSubFolder As Outlook.Folder Dim objExplorer As Outlook.Explorer Dim strMessage As String
Set objExplorer = Application.ActiveExplorer
For Each objFolder In objExplorer.CurrentFolder.Folders If objFolder.DefaultItemType = olMailItem Then strMessage = "Folder: " & objFolder.Name & vbTab & "Email Count: " & objFolder.Items.Count Debug.Print strMessage ' You can output the message to the Immediate Window (Ctrl + G) or modify to display in a message box. End If Next objFolder End Sub
You can run this macro to display the email count in each folder. Make sure to enable macros in Outlook and then run the macro using the Developer tab or by assigning it to a button.
Please let me know if these information answered the concern and helped us to resolve the issue. Give back to the Community. Help the next person who has this issue by indicating if this reply solved your problem. Click Yes or No below.
Kind regards, Kevin