Macros or VBA code found

The Document Inspector found one or more of the following items that may contain hidden data in your Office document (Word, Excel, or PowerPoint):

  • Macros (including any WordBasic macros in Word documents or Excel 4.0 Macro Sheets (XLM) in Excel workbooks)

  • VBA modules

  • COM or ActiveX controls

  • User Forms (including any Excel 5.0 Forms in Excel workbooks)

  • User-Defined Functions (UDFs) in Excel workbooks


The Document Inspector can't remove these items for you, because removing these items may cause your document to stop working properly.

Recommended solution

  1. Close the Document Inspector.

  2. Manually remove any macros, VBA modules, COM or ActiveX controls, user forms, or UDFs that might have hidden data from your document.

    Here's how you can find macros and VBA modules in your document:

    • In Word or Excel, click View > Macro > View Macros.

      In PowerPoint, click View > Macro.

      In the Macro box, pick the macro you want to remove and click Delete.

    • Press Alt+F11 to find macros in the VBA Editor.

  3. To verify the issue is resolved, click File > Info > Check for Issues, and click Inspect Document.

Need more help?

Expand your Office skills
Explore training
Get new features first
Join Office Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.