Sunday, September 14, 2008

Word Macro Error

When you open Word 2003 you might get the following error
"The document contains macros. Macro language support for this application is disabled. Features requiring VBA are not available. Would you like to open this document read-only?"



The most possible reason is Visual Basic for Applications (VBA) is not installed on your computer.

If VBA is not installed, it is not possible to accept certificates of trust attached to VBA macros. Therefore, any VBA macro attempting to run, even with an attached certificate of trust, cannot be run because the necessary macro interpreter is not installed on the system. Two scenarios can cause this error:

Your administrator chose not to install VBA
The version of Office you are running does not install VBA by default

If you are running an instance of Office that does not provide VBA as an installable feature, you will need to upgrade your version of Office to run VBA macros.

If some items— such as templates (template: A file or files that contain the structure and tools for shaping such elements as the style and page layout of finished files. For example, Word templates can shape a single document, and FrontPage templates can shape an entire Web site.) (including default templates like Normal.dot in Microsoft Word), add-ins, wizards, or custom commands— do not function the way you expect, you may be running a Microsoft Office program with the Visual Basic for Applications (VBA) (VBA: A macro-language version of Microsoft Visual Basic that is used to program Windows applications and is included with several Microsoft applications.) shared feature disabled. Many features in Office are created in VBA or depend on VBA support to function correctly. If you choose not to install the VBA feature, these dependent applications and features will be disabled or not installed.

To re-enable VBA, follow these steps:
1. Run the Office Setup program again.
  1. Quit all programs.
  2. Double-click the Add/Remove Programs icon in the Microsoft Windows Control Panel.
  3. Do one of the following:
    • If you installed your Office program as part of Microsoft Office, click Microsoft Office in the Currently installed programs box, and then click the Change button.
    • If you installed your Office program individually, click the name of your program in the Currently installed programs box, and then click the Change button.
2. Select "Add or Remove Features. Change which features are installed or remove specific features". Click Next.


3. On the next screen check the box "Choose advanced customization of applications". Click Next.


4. On the Advanced Customization window, click the plus sign (+) next to Office Shared Features. Click Next.


5. Select Visual Basic for Applications, click the red cross (x) next to your selection, and then click Run from My Computer. Click Update.


If someone else set up your Office installation for you, contact your System Administrator or Information Technology (IT) Professional to see whether you are running Office with VBA disabled.

----------------------------------------
Help protect Office without removing functionality
To help protect against macro viruses, you should purchase and install specialized antivirus software. To further help protect yourself from macro viruses, you can use the following procedures:
Set macro security levels to High

1. On the Tools menu, click Options.
2. Click the Security tab.
3. Under Macro Security, click Macro Security.
4. Click the Security Level tab, and then select the security level you want to use.

Clear the Trust all installed add-ins and templates check box
Depending on your macro (macro: An action or a set of actions you can use to automate tasks. Macros are recorded in the Visual Basic for Applications programming language.) security setting, when you open a macro, you will receive a warning and the macro may be disabled for installed templates (template: A file or files that contain the structure and tools for shaping such elements as the style and page layout of finished files. For example, Word templates can shape a single document, and FrontPage templates can shape an entire Web site.) and add-ins (add-in: A supplemental program that adds custom commands or custom features to Microsoft Office.) (including wizards).

1. On the Tools menu, click Options, and then click the Security tab.
2. Under Macro Security, click Macro Security.
3. Click the Trusted Sources tab.
4. Clear the Trust all installed add-ins and templates check box.

Note All templates, add-ins, and macros shipped with Microsoft Office 2003 are digitally signed by Microsoft. Once you add Microsoft to your list of trusted sources for one of these installed files all subsequent interaction with these files will not generate messages.

Clear the list of trusted sources
To perform this procedure, you must have Microsoft Internet Explorer version 4.0 or later installed on your computer.
1. On the Tools menu, click Options, and then click the Security tab.
2. Under Macro Security, click Macro Security.
3. Click the Trusted Publishers tab.
4. Click the source you want to remove from the list.
5. Click Remove.
----------------------------------------

1 comment: