COM ??-???? ?? ??????? ??-???? Excel

???? ?????? ???? ??????
???? ID: 291392 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
??? ?? ??????? ???? | ??? ?? ??????? ????

??????

Microsoft Office Excel 2002 ?? Microsoft Office 2007 ??????? ??-?? ??? ???????? ???? (COM) ??-?? ?? ????? ??????? ?? ???? ????? ???? ?? ?? ?? ?? ?????? ?? ??-?? ?? ?????

???? ???????

COM ??-????

COM ??-?? ?????? ????? ??????? ?? ??? Office 2000, Office XP, Office 2003 ?? Office 2007 ??????????? ?? ??????????? ?? ????????? ???? ?? ??? ?? ??? ?? ????? ??? COM ??-?? ?????????? CommandBar ???, ???? ??????? ?? ????? ????? ???, ?? ??? ???? ???? Excel ?? ???? ????? ?? ????????????? ?? ??? ???? ?? ???????????? ?? ???? ???? ???? ?? ??? ??????? ?? ?? ????? ?? ??????????? ??? Excel ?? ???????? ???? ?? ??? ????? ??? ???? ???? ?????? COM ??-?? ???????????? ??? ???? ??????? ?? ???? ??? ?? ???? ?? ???? ???

???? COM ??-?? ???? ???-????????? COM ????? (??? ActiveX DLL) ?? ??????????? ???? ?????? ??IDTExensibility2???????? ??? ??? COM ??-?? ?? ??????? ?? ???? ????????? ?? ???????? ??????????? ???? ?????:OnConnection,OnStartupComplete,OnAddinsUpdate,OnBeginShutDown, ??OnDisconnection.

?? ??? COM ??-?? ??????? ?? ?? ??? ??????????-??????, ????????? ???????????? ??-?? ?? ??? ???? ?? ???? ??????? COM ?? ????? ???? COM ??-?? ???????, ?????? ??? ????? ?? ???????? Office ????????? ?? ??? ??????? ???? ??? ??? COM ??-?? Excel ?????? ???????? ?? ????? ????????? ????? ??? ??????? ???:
HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins\ 
					
?? ????? ?? ??? ???????? ??????? COM ??-?? ??????? ??? ??? ??????? ?? ??? ?? ProgID ?? ??? COM ??-?? ??? ??????? ?? ??? ??? COM ??-?? ??? ?? ??? ?? ?? ????? ???? COM ??-?? ?? ???????? ???, ?????, ?? ??????? ??? ??? ??? ??????? ?? ????? ?? ?? ???? ??-?? ?? ??? Excel ???: ?????????, ????, ???? ????????? ?? ??? ?? ??? ???? ?? ??? ????, ?? ??? ???? ?????

COM Add-ins can also be loaded and unloaded through the Excel 2002 user interface. ??? ???? ?? ???, ????? ????? ?? ???? ????::
  1. ????? ????????????? ??,????? ??????? ????-????? ????, ?? ???? ??????????? ????.
  2. ?????????? ?????????? ????? ???, ????? ???????????? ?? ????? ????.. In the list of categories, select?????. ??????COM Add-insin the list of commands and drag the command to a menu or CommandBar of your choice. ??? ????????? ?????????? ????? ?? ??????? ?? ??? ?? ..
  3. ????? ????COM Add-inscommand that you added to display theCOM Add-ins????? ????? ?? ??????? ?? ??? ?? .. The dialog box lists all COM Add-ins that are installed on your system, and the COM Add-ins that are currently loaded are selected.
COM Add-ins can also be loaded and unloaded through the Excel 2007 user interface. ??? ???? ?? ???, ????? ????? ?? ???? ????::
  1. ????? ????Microsoft Office ????? ????-????? ????, ?? ???? ???Excel ??????.
  2. ????? ????,??-??.
  3. ?? ??????????????? ????????? ????,COM Add ins?? ????-????? ????, ?? ???? ????? ????.

    TheCOM Add-ins????? ????? ??? ???????? ??? COM ??-???? ?? ???? ???????? ?? ??????? ????? COM ??-???? ?? ??????? ??? ??? ??? ?? ????? ????
???????? ??????? ?? ???? ??? COM ??-??, ?? ??? ?????? ?? Microsoft ???????? ??? ????? ?? ??? ????? ???? ???????? ?? ????? ????:
238228HOWTO: ??? Office 2000 COM ??-?? Visual Basic ??? ?????
230689?????: Comaddin.exe Office 2000 COM ??-?? ????? C++ ??? ????
???? ??????? ?? ???, ????? Microsoft ??? ???? ?????:
Office ??-????
http://support.microsoft.com/ofd

??????? ??-????

COM ??-??, Excel 2002 ?? Excel 2003 ?? ?????? ???? ?? ????? ??????? ?????? ins. ??????? ??-?? ????? ?? COM ??-?? ?? ??????? ??? Excel ?????????? ?? ??????? ??-?? ??? ?????? ?? ??? ???? ?? ???? ?? ???? ???? COM ??-???? ???-????????? COM ??????? ?? ?????? ???? ???? ???? ?????IDTExtensibility2???????; ???????, ??????? ??-?? ?? ???? ?? COM ????? ?? ?? ??????????? ???-????????? ?? ???-??-?????????IDTExtensibility2???????? ???

Excel ??? ?? ??????? ??-?? ?? ?????? ?? ????? ????, ????? ????? ?? ???? ????:
  1. ????? ????????????? ??,??-??.
  2. ???????-??????? ????? ???, ????? ???????????. ??????? COM ??????? ?? ???? ?? ???? ??????? ?? ??? ???? ??-?? ?? ????? ????OK.
  3. ??????? ??-?? ??? ????? ???? ????-????????? ????? ?? ??????? ?? ??? ?? .. ????? ????,OK??? ???? ?? ?????-??????? ????? ?? ??????? ?? ??? ?? ..
To use functions from an Automation Add-in in Excel 2007, follow these steps:
  1. ????? ????Microsoft Office ????? ????-????? ????, ?? ???? ???Excel ??????.
  2. ????? ????,??-??.
  3. ?? ??????????????? ????????? ????,Excel Add ins?? ????-????? ????, ?? ???? ????? ????.
  4. ???????-??????? ????? ???, ????? ???????????. In the list of registered COM servers, click your Automation Add-in, and then clickOK.

    The Automation Add-in appears in the??-????????? ????? ?? ??????? ?? ??? ?? .. ????? ????,OK??? ???? ?? ?????-??????? ????? ?? ??????? ?? ??? ?? ..
When you make additions to the list in the??-??dialog box or when you select and clear Add-ins in the list, Excel stores your changes in the registry. First, Excel uses the following registry setting to determine whether or not an Automation Add-in in the Add-in list is loaded:
 Excel 2002
Key:            HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Excel\Options
String:         OPENx
Sample Value:   /A "ServerName.ClassName"
					
 Excel 2003
Key:            HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Options
String:         OPENx
Sample Value:   /A "ServerName.ClassName"
					Excel 2007
Key:            HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Excel\Options
String:         OPENx
Sample Value:   /A "ServerName.ClassName"
					
The/Aswitch that is used in the string value is new to Excel 2002 / Excel 2003 and is used specifically to load Automation Add-ins. All Automation Add-ins are loaded on demand; there is no setting that can change the load behavior for an Automation Add-in.

When an Automation Add-in that is listed in the??-??dialog box is cleared, a subkey with a name equal to the Add-in's ProgID is created in the following registry key:
Excel 2002:
HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Excel\Add-in Manager
					 Excel 2003:

HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Add-in Manager
					
This registry setting ensures that Automation Add-ins that you have added to the Add-ins list are retained in the list even when you have chosen not to load them.

For more information about Automation Add-Ins, see the following articles in the Microsoft Knowledge Base:
285337HOWTO: Create a Visual Basic Automation Add-in for Excel Worksheet Functions
For more information, see the following Microsoft Web site:
Office Add-ins
http://support.microsoft.com/ofd

Automation Add-ins That Implement IDTExtensibility2

As previously mentioned, an Automation Add-in may implementIDTExtensibility2, but it is not required in order for Excel to call the functions in the Add-in from a worksheet. If you require that your Automation Add-in obtains a reference to the Excel instance, you can implementIDTExtensibility2and use the?????????parameter ofOnConnectionto automate Excel.

An Automation Add-in that implementsIDTExtensibility2can be loaded in the Excel user interface through both theCOM ??-??dialog box and the??-??????? ????? ?? ??????? ?? ??? ?? .. The following describes the behavior of an Automation Add-in based on whether it is loaded in one or both of these dialog boxes:
  • Loaded only in the??-????????? ????? ?? ??????? ?? ??? ?? ..

    The Add-in is loaded on demand. Functions in the Add-in may be called from formulas in a worksheet.
  • Loaded only in theCOM Add-ins????? ????? ?? ??????? ?? ??? ?? ..

    The Add-in is loaded as a COM Add-in and its load behavior is determined from settings in the registry. Functions in the Add-in cannot be called from formulas in a worksheet.
  • Loaded in both theCOM Add-insdialog box and the??-????????? ????? ?? ??????? ?? ??? ?? ..

    Two separate instances of the Add-in are loaded. One instance is loaded as a COM Add-in and the other instance is loaded as an Automation Add-in. The COM Add-in instance uses the load behavior indicated in the registry; the Automation Add-in instance loads on demand. The two instances work independently of one another and do not share global variables.
??????? ??-?? ???? ?? ??? ??? ?? ???, ??????? Excel ???? ?????? ??? ??? ?? ?? ??-?? ??? ???? ?? ?????? ?? ???? ??? ?????, ?? ?? ?????? ?? ??????? ??-?? ?? ?? ?????? ???? ??IDTExtensibility2, careful ???? Excel ?? ????????? ???? ?? ?????? ???? ?? ?? ??? ???? ?? ??? ???? ???? ????? ?????? ?? ?????-loads ??? ??????? ???? ??????? ?? ???, Microsoft ???????? ??? ?????????? ???? ?????::
284876BUG: Excel ???? ??????? ??-?? ??? ???? ?? ???
(?) Microsoft Corporation 2001, ??? ?????? ????????? ???????? Lori B. Turner, Microsoft Corporation ?????? ???

???

???? ID: 291392 - ????? ???????: 06 ??????? 2011 - ??????: 3.0
???? ???? ???? ??:
  • Microsoft Office Excel 2007
  • Microsoft Excel 2002 Standard Edition
??????: 
kbautomation kbinfo kbmt KB291392 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:291392

??????????? ???

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com