Macros in Microsoft Office programs allow you to automate repetitive tasks, but some macros can be dangerous. Macros are bits of computer code and they’re infamous for containing malware that will infect your computer if you run them. Microsoft Office protects you from files containing macros by default.
When you open a Word, Excel, or PowerPoint file containing macros (.docm, .xlsm, or .pptm, respectively), a Security Warning message displays below the ribbon in the program telling you that macros have been disabled. If, and only if, you know the document came from a trusted source, you can click the “Enable Content” button on the Security Warning message to enable the macros in that document.
If you know what you’re doing, and you don’t want to see that message every time you open an Office document, you can disable it. We’ll show you how to disable the message without compromising the security of your Office programs. However, this doesn’t mean you can’t ever use macros in your Office documents again. If you deal with some Office files that have macros from trusted sources, you can set up a trusted location in which you can place those trusted files for each Microsoft Office program. Office files placed in a trusted location are ignored when you open them from that location, and macros are not disabled. We’ll also show you how to set up a trusted location for important files received from trusted sources.
First, we’ll disable the Security Warning message bar. To do that, you’ll need to enable the Developer tab, then click on it.
In the “Code” section, click “Macro Security”.
The Trust Center dialog box displays with the Macro Settings screen active. The “Disable all macros with notification” option is selected by default. You can disable the Security Warning by selecting “Disable all macros without notification”.
If you want to allow digitally signed macros to run, select the “Disable all macros except digitally signed macros” option. This only allows macros digitally signed by a publisher you’ve trusted to run. If you have not trusted the publisher, you are notified. All unsigned macros are automatically disabled without notification.
Microsoft explains what “digitally signed” means here:
Excel uses digital signatures on the workbook contents to help ensure that the workbook has not been modified and saved since it was signed. Digital signatures can also help you distinguish workbooks and macros created by a reliable source from undesirable and potentially damaging workbooks or macro code (viruses).
A digital signature is a public certificate plus the value of the signed data as encrypted by a private key. The value is a number that a cryptographic algorithm generates for any data that you want to sign. This algorithm makes it nearly impossible to change the data without changing the resulting value. So, by encrypting the value instead of the data, a digital signature helps a user to verify the data was not changed.
We do NOT recommend selecting the last option, “Enable all macros”, as that will leave your computer unprotected from potential malware in macros from unknown sources.
Changing these macro settings in the Trust Center only affects the Office program you are currently using. To change these settings in Excel or PowerPoint, you must open those programs and change the settings there as well. The macro settings are accessed the same way in Excel and PowerPoint as they are in Word.
There is also another way to disable the Security Warning message that will disable the message in all Office programs and overrides the macro settings regarding notifications. Click “Message Bar” in the list of items on the left side of the Trust Center dialog box.
In the “Message Bar Settings for all Office Applications” section, select the “Never show information about blocked content” option. The Security Warning will not display in any of the Office programs now, even if the “Disable all macros with notification” option is selected on the Macro Settings screen.
You might work with documents containing macros that you receive from trusted sources, such as documents in which your co-workers or boss created some macros to make it easier to create and maintain the documents. For those types of documents, you can choose a folder on your computer to be a trusted location where you can store and access these documents. Any Office documents opened from within that folder are ignored when the Office program checks for macros. To set up a trusted location to store and access documents from trusted sources, click “Trusted Locations” in the list on the left.
Microsoft automatically adds some folders as trusted locations that the current program uses when running. You can add your own folders to that list.
Click “Add new location” towards the bottom of the Trust Center dialog box.
The Microsoft Office Trusted Location dialog box displays. The default location currently selected in the User Locations list is automatically entered into the Path edit box. To change this location, either type a new full path in the edit box or click “Browse”. Browsing for the location is easier, so we’ll do that.
Navigate to the folder in which you want to store your trusted documents for access and click “OK”.
The selected full path is added to the Path edit box. If you want to include any subfolders within the selected folder as trusted locations, select the “Subfolders of this location are also trusted” check box so there is a check mark in the box.
NOTE: We do NOT recommend using a network drive as a trusted location because other people who have access to the same network could have tampered with the file. You should only make folders on your local hard drive trusted locations, and you should protect your Windows account with a strong password.
Enter a description for this folder in the “Description” box, so you know the purpose of this folder when you see it in the list on the Trusted Locations screen. Then, click “OK”.
The path, description, and data modified for the new trusted location is added to the list.
Details about the selected trusted location are also listed at the bottom of the Trusted Locations screen, including whether or not Sub Folders are allowed.
If you selected a folder on a network as your trusted location (again, we do NOT recommend this), select the “Allow Trusted Locations on my network (not recommended)” check box.
You can Modify trusted locations in the list or Remove them by selecting the location in the list and clicking the appropriate button to the right of the Add new location button. Once you’ve finished setting up your trusted location, click “OK” on the Trust Center dialog box to accept your changes and close it.
Now your Microsoft Office programs will remain protected from malware in the form of macros, but you can still run macros in trusted documents. And you don’t have to see the Security Warning message every time.