您的位置:首页 > 其它

寻觅在office(确切的说是word) 的工具栏中添加控件的方法,找到了这个控件列表

2007-04-18 16:33 459 查看
需要在office2003的工具条(CommandBar)上面添加一个label和一个textbox,找了半天没找到.

在msdn里面找到了这个:

Members
Member nameDescription
msoControlActiveXActiveX control.
msoControlAutoCompleteComboCombo box in which the first matching choice is automatically filled in as the user types. Cannot be created through the object model.
msoControlButtonCommand button.
msoControlButtonDropdownDrop-down button. Cannot be created through the object model.
msoControlButtonPopupPop-up button. Cannot be created through the object model.
msoControlComboBoxCombo box.
msoControlCustomCustom control. Cannot be created through the object model.
msoControlDropdownDrop-down list.
msoControlEditText box.
msoControlExpandingGridExpanding grid. Cannot be created through the object model.
msoControlGaugeGauge control. Cannot be created through the object model.
msoControlGenericDropdownGeneric drop-down list. Cannot be created through the object model.
msoControlGraphicComboGraphic combo box. Cannot be created through the object model.
msoControlGraphicDropdownGraphic drop-down list. Cannot be created through the object model.
msoControlGraphicPopupGraphic pop-up menu. Cannot be created through the object model.
msoControlGridGrid. Cannot be created through the object model.
msoControlLabelLabel. Cannot be created through the object model.
msoControlLabelExExtended label. Cannot be created through the object model.
msoControlOCXDropdownOCX drop-down list. Cannot be created through the object model.
msoControlPanePane. Cannot be created through the object model.
msoControlPopupPop-up.
msoControlSpinnerSpinner. Cannot be created through the object model.
msoControlSplitButtonMRUPopupMost Recently Used (MRU) pop-up. Cannot be created through the object model.
msoControlSplitButtonPopupSplit button pop-up. Cannot be created through the object model.
msoControlSplitDropdownSplit drop-down list. Cannot be created through the object model.
msoControlSplitExpandingGridSplit expanding grid. Cannot be created through the object model.
msoControlWorkPaneWork pane. Cannot be created through the object model.
这就是在office上面的控件的enum值.后面标注了是否可以创建,但可惜,大部分都不能创建(Cannot be created through the object model.).

最后还有段话:

Remarks
Used with the Add method of the CommandBarControls object. Only a limited set of the control types can be created via the CommandBars object model: msoControlButton, msoControlEdit, msoControlDropdown, msoControlComboBox, msoControlPopup, and msoControlActiveX. Other control types may exist on built-in or add-in command bars, but cannot be created via the object model.

遗憾啊遗憾啊.

注:来自ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.chs/offio11ref/html/T_Microsoft_Office_Core_MsoControlType.htm
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: