We can enable error logging and displaying of error message for the VSTO add-in by setting environment variables VSTO_SUPPRESSDISPLAYALERTS and VSTO_LOGALERTS . To display each error in a message box, set the VSTO_SUPPRESSDISPLAYALERTS variable to 0 (zero).