From Visual Basic or VBA:
This security option makes it more difficult for unauthorized programs to build "self-replicating" code that can harm end-user systems.
Office 2003 and Office XP
- Open the Office 2003 or Office XP application in question. On the Tools menu, click Macro, and then click Security to open the Macro Security dialog box.
- On the Trusted Sources tab, click to select the Trust access to Visual Basic Project check box to turn on access.
- Click OK to apply the setting. You may need to restart the application for the code to run properly if you automate from a Component Object Model (COM) add-in or template.
- Open the 2007 Microsoft Office system application in question. Click the Microsoft Office button, and then click
- Click the Trust Center tab, and then click
Trust Center Settings.
- Click the Macro Settings tab, click to select the Trust access to the VBA project object model check box, and then click OK.
- Click OK.