Solution
This error can occur at either the Excel Import Module.vi or Word Import Module.vi. The directions below are assuming you receive the error with Excel. If you are using Word simply replace the text Excel with Word below.
To get rid of this error you must follow the advice from the error message and make Visual Basic a trusted macro source.
- In Microsoft Excel 2003 go to Tools»Options»Security»Macro Security»Trusted Publishers and click the checkbox next to both Trust all installed add-ins and templates and Trust access to Visual Basic Project.
- In Microsoft Excel 2007, click the Office Button in the top left then click Excel Options. Click on Trust Center from the list on the left, and then click Trust Center Settings... Click on Macro Settings and check the box for Trust access to the VBA project object model.
- In Microsoft Excel 2010 and newer, click the File Tab in the top left then click Options. Click on Trust Center from the list on the left, and then click Trust Center Settings... Click on Macro Settings and check the box for Trust access to the VBA project object model.
It may be necessary to restart the computer after making this change for it to take effect in LabVIEW.
If you encounter this error when deploying an application built in LabVIEW containing the Excel Import Module.vi or Word Import Module.vi, make sure to make Visual Basic a trusted macro source in the deployment machines as well.