Sie sind auf Seite 1von 3

Excel > Macros

Enable or disable macros in Office files


A macro is a series of commands that you can use to automate a repeated task, an
d can be run when you have to perform the task. This article has information abo
ut the risks involved when you work with macros, and you can learn about how to
enable or disable macros in the Trust Center.
In this article
-------------------------------------------------------------------------------Enable macros when the Message Bar appears
Enable macros in the Backstage view
Enable macros for one time when the Security Warning appears
Change macro settings in the Trust Center
Macro settings explained
What is a macro, who makes them, and what is the security risk?
-------------------------------------------------------------------------------Enable macros when the Message Bar appears
When you open a file that has macros, the yellow Message Bar appears with a shie
ld icon and the Enable Content button. If you know the macro, or macros, are fro
m a reliable source, use the following instructions:
On the Message Bar, click Enable Content.
The file opens and is a trusted document.
The following image is an example of the Message Bar when macros are in the file
.

Top of Page
Enable macros in the Backstage view
Another method to enable macros in a file is via the Microsoft Office Backstage
view when the yellow Message Bar appears.
Click the File tab. The Backstage view appears.
In the Security Warning area, on the Enable Content button, click the down-arrow
.
Under Enable All Content, select Always enable this document's active content.
The file becomes a trusted document.
The following image is an example of Enable Content button options.

Top of Page
Enable macros for one time when the Security Warning appears
Use the following instructions to enable macros for the duration that the file i
s open. When you close the file, and then reopen it, the warning appears again.
Click the File tab. The Backstage view appears.

In the Security Warning area, on the Enable Content button, click the down-arrow
.
Select Advanced Options.
In the Microsoft Office Security Options dialog, select Enable content for this
session for each macro.
Click OK.
Top of Page
Change macro settings in the Trust Center
Macro settings are located in the Trust Center. However, if you work in an organ
ization, the system administrator might have changed the default settings to pre
vent anyone from changing settings.
Important When you change your macro settings in the Trust Center, they are cha
nged only for the Office program that you are currently using. The macro setting
s are not changed for all your Office 2010 programs.
Click the File tab. The Backstage view opens.
Under Help, click Options; the Options dialog box appears.
Click Trust Center, then click Trust Center Settings.
In the Trust Center, click Macro Settings.
Make the selections that you want. Click OK.
The following image is the Macro Settings area of the Trust Center.

Use the information in the following section to learn more about macro settings.
Top of Page
Macro settings explained
Disable all macros without notification Macros and security alerts about macro
s are disabled.
Disable all macros with notification Macros are disabled, but security alerts
appear if there are macros present. Enable macros on a case-by-case basis.
Disable all macros except digitally signed macros Macros are disabled, but sec
urity alerts appear if there are macros present. However, if the macro is digita
lly signed by a trusted publisher, the macro runs if you have trusted the publis
her. If you have not trusted the publisher, you are notified to enable the signe
d macro and trust the publisher.
Enable all macros (not recommended, potentially dangerous code can run) All ma
cros run. This setting makes your computer vulnerable to potentially malicious c
ode.
Trust access to the VBA project object model Disallow or allow programmatic ac
cess to the Microsoft Visual Basic for Applications (VBA) object model from an a
utomation client. This security option is for code written to automate an Office
program and manipulate the VBA environment and object model. It is a per-user a
nd per-application setting, and denies access by default, hindering unauthorized
programs from building harmful self-replicating code. For automation clients to
access the VBA object model, the user running the code must grant access. To tu
rn on access, select the check box.
Note
Microsoft Publisher and Access have no Trust access to the VBA project
model object option.
Top of Page
What is a macro, who makes them, and what is the security risk?
Macros automate frequently used tasks to save time on keystrokes and mouse actio
ns. Many were created by using Visual Basic for Applications (VBA) and are writt
en by software developers. However, some macros can pose a potential security ri

sk. A person with malicious intent, also known as a hacker, can introduce a dest
ructive macro in a file that can spread a virus on your computer or into your or
ganization's network.

See Also
Active content types in your files
Add, remove, or modify a trusted location for your files
Add, remove, or view a trusted publisher
Trusted documents
What is File Block?
What is Protected View?

Das könnte Ihnen auch gefallen