Should Word VSTO Add-ins be able to run with Visual Basic for Applications (VBA) disabled?

Cameron Dwyer 21 Reputation points MVP
2023-05-03T11:40:11.3433333+00:00

My understanding from reading the following Office VSTO documentation on Microsoft Learn/Microsoft Support is that VSTO Add-ins should continue to work when Visual Basic for Applications (VBA) is disabled (via group policy or in the registry).

How to turn off Visual Basic for Applications when you deploy Office - Office | Microsoft Learn

Considerations for disabling VBA in Office - Microsoft Support

When setting the VBAOFF registry key VSTO add-ins in Excel and PowerPoint continue to work fine but Word brings up the following warning message as the add-in starts up.

User's image

Image

Here is a GitHub repo that minimally reproduces the issue using a new blank VSTO Word Add-in created with Visual Studio 2022. Even if you add no code to a new Word VSTO add-in it will cause this error message to show in Word at startup.

GitHub - Coianiz/WordAddInDisableMacros

Can I get clarification on whether this is an unintentional bug or if I've missed something whereby we should be able to run Word VSTO add-ins with VBA disabled.

The Australian Government (Australian Cyber Security Center) has started publishing advice regarding disabling VBA and this is leading to the VSTO Add-ins not functioning for Government customers in Australia who are implementing this advice.

Microsoft Office Macro Security | Cyber.gov.au

Thanks.

Microsoft 365 and Office | Development | Other
Microsoft 365 and Office | Install, redeem, activate | For business | Windows
Microsoft 365 and Office | Word | For business | Windows

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.