Microsoft KB Archive/827742

= You are prompted to grant permission for ActiveX Controls when you open an Office XP or Office 2003 document =

Article ID: 827742

Article Last Modified on 10/16/2007

-

APPLIES TO


 * Microsoft Office Word 2003
 * Microsoft Office Excel 2003
 * Microsoft Office PowerPoint 2003
 * Microsoft Office Outlook 2003
 * Microsoft Office Access 2003
 * Microsoft Office Publisher 2003
 * Microsoft Office FrontPage 2003
 * Microsoft Office XP, All Editions
 * Microsoft Excel 2002 Standard Edition
 * Microsoft PowerPoint 2002 Standard Edition
 * Microsoft Word 2002 Standard Edition
 * Microsoft Visual Basic for Applications 6.0

-



Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry



SYMPTOMS
When you open a document in one of the Microsoft Office programs listed in the &quot;Applies to&quot; section, you may be prompted to grant permission for ActiveX Controls to be loaded or to permit the controls to maintain persisted data. Some ActiveX Controls may not load at all.

Additionally, when you import an Office document that contains ActiveX Controls to another program such as a Microsoft SharePoint Team Services Web site, you may receive a warning message that is similar to the following:

This application is about to initialize ActiveX Controls that might be unsafe. If you trust the source of this document, select Yes and the control will be initialized using your document settings.

If you click No, the ActiveX Controls do not load. If you click Yes, the ActiveX Controls load.



CAUSE
This problem occurs when you try to open a document that contains ActiveX Controls that are marked as unsafe for initialization (UFI). By default, the Office programs do not load or activate ActiveX Controls that are not marked as safe for initialization (SFI). This problem also applies to the ActiveX Controls that are included with the Office programs. Additionally, Winsock is not registered as an SFI control. For this reason, ActiveX Controls that have not implemented IObjectSafety are handled as UFI controls. Additionally, ActiveX Controls that have not marked the appropriate component category in the registry are also handled as UFI controls.



WORKAROUND
Note We highly recommend that you do not run ActiveX Controls in documents that are submitted to you by people who you do not know because there is no guarantee that the data that is associated with the control is actually safe to use. However, if you trust the source of the document and the individual or the company that sent it to you, you can load the control and permit it to use persisted data.

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

To work around this problem and change the way that the Office programs treat ActiveX components, add the UFIControls key to the registry that changes the Office programs behavior. For more information about how to do this, see the &quot;Change the registry settings to UFIControls = 1&quot; section.

Information about the UFI control settings for ActiveX components
When the control is SFI, the Office programs behave the same:
 * If UFIControls is equal to 1 (least secure), 3 or 5: Load (no prompt) the ActiveX control in un-safe mode with the document persisted property values if they exist otherwise with default properties (InitNew).
 * If UFIControls is equal to 2, 4 (most secure) or 6 (default setting): Load (no prompt) the ActiveX control in safe mode with the document persisted property values if they exist otherwise with default properties (InitNew).

UFIControls = 4 is the most secure setting because it does force the Office programs to load UFI controls with default properties but to avoid user confusion with a new behavior for UFI, the default for UFIControls = 6 because the UFI controls load with document persisted property.

Note Every subkey that is listed under the  registry key has an equivalent subkey under the following registry keys:

In Office XP, UFI controls will bring a dialog box before loading, but in the Office programs they were initialized silently. To see the file as they did with Office XP, users must use one of the following methods:
 * Click Yes to continue in the warning message.
 * Change the registry setting to UFIControls = 1.
 * Contact the author of the ActiveX control to make their ActiveX control SFI.

Administrators can set the default by using the Custom Installation Wizard (CIW). For more information about the CIW, see the Office Resource Kit. To do this, visit one of the following Microsoft Web sites:

Office 2003

http://www.microsoft.com/office/ork/2003/tools/BoxA03.htm

Office XP

http://www.microsoft.com/office/ork/xp/appndx/appa04.htm

Change the registry settings to UFIControls = 1
To modify the registry and add the UFIControl subkey, follow these steps:  Click Start, click Run, type regedit, and then click OK. Expand the following registry subkey:

 

 Right-click Common, point to New, and then click Key. Type Security, and then press ENTER to name the new subkey. Right-click Security, point to New, and then click DWORD Value. Type UFIControls, and then press ENTER to name the value.</li> Double-click UFIControls.</li> In the Value data box, type 1, and then click 'OK'.

Note The available settings for UFIControls are 1 through 6. The most secure setting is 4. The default setting is 6, and the least secure setting is 1. For more information about the valid values for this DWORD Value, see the &quot;Information about the UFI control settings for Active X components&quot; section.</li> Quit Registry Editor.</li></ol>

Forms3 and ActiveX initialization (Office 2003 and Office XP)
By using the common security registry key, you can instruct the Office 2003 and Office XP programs to set Forms3 ActiveX initialization security for all Office 2003 and Office XP programs that support Forms3. If the setting of the key is 2 or 3, the user is prompted to determine how Forms3 forms will load. The prompt only appears one time per session in a program. The location of the registry key is the following:

HKEY_CURRENT_USER\Software\Microsoft\VBA\Security

In either the registry or policy node, the value name LoadControlsInForms can be set to the following values and respective actions.

Description of the value data
The value data can be explained as follows:
 * Use 1 for a UFI or SFI signed control that supports safe and unsafe mode, load the control in unsafe mode. For an SFI signed control that only supports a safe mode configuration, load the control in safe mode.
 * Use 2 (default setting) for a UFI signed control, if the user responds with a Yes to the prompt, load the control in unsafe mode. If the user responds with a No, load using the default properties. For an SFI control that supports both a safe and unsafe mode, if the user responds to the prompt with a Yes, load the control in unsafe mode. If the user responds with a No, load the control using safe mode. If the SFI control can only support safe mode, load the control in safe mode.
 * Use 3 for a UFI signed control, if the user responds with a Yes to the prompt, load the control in unsafe mode. If the user responds with a No, load the control with its default properties. For an SFI control, load in safe mode.
 * Use 4 for a UFI signed control, load with the default properties of the control. For an SFI control, load in safe mode (considered to be the safest mode).

<div class="moreinformation_section">

MORE INFORMATION
For more information about problems with ActiveX Controls, click the following article number to view the article in the Microsoft Knowledge Base:

817112 ActiveX controls do not load or function as expected when you open a document with Office 2003 program

ActiveX Controls are programs and can store data in either the registry or the control itself. ActiveX Controls are similar to Microsoft Visual Basic for Applications (VBA) macros except that they are compiled to a special file type and can be hosted by programs that can support them--for example, Microsoft Word 2002 and Microsoft Excel 2002.

To use an ActiveX control, a control link reference is embedded in the Office document. Office programs can only preserve or migrate ActiveX control link references to new versions of the document if the ActiveX control is activated when the document is opened. A subsequent save of the document if the ActiveX control is disabled saves a version of the document without the link reference (the ActiveX control is removed). Sometimes this is not what you want because you must have the control to view some or all the content of the document.

Not all file formats support ActiveX control linking. Therefore, even if the document is opened with the ActiveX control activated, it will not save it to formats that do not support ActiveX controls.

Note If you let the program run the control and use persisted data, you do so at your own risk.

<div class="references_section">