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

需要在office2003的工具条(CommandBar)上面添加一个label和一个textbox,找了半天没找到.

在msdn里面找到了这个:
Members
Member name Description
msoControlActiveX ActiveX control.
msoControlAutoCompleteCombo Combo box in which the first matching choice is automatically filled in as the user types. Cannot be created through the object model.
msoControlButton Command button.
msoControlButtonDropdown Drop-down button. Cannot be created through the object model.
msoControlButtonPopup Pop-up button. Cannot be created through the object model.
msoControlComboBox Combo box.
msoControlCustom Custom control. Cannot be created through the object model.
msoControlDropdown Drop-down list.
msoControlEdit Text box.
msoControlExpandingGrid Expanding grid. Cannot be created through the object model.
msoControlGauge Gauge control. Cannot be created through the object model.
msoControlGenericDropdown Generic drop-down list. Cannot be created through the object model.
msoControlGraphicCombo Graphic combo box. Cannot be created through the object model.
msoControlGraphicDropdown Graphic drop-down list. Cannot be created through the object model.
msoControlGraphicPopup Graphic pop-up menu. Cannot be created through the object model.
msoControlGrid Grid. Cannot be created through the object model.
msoControlLabel Label. Cannot be created through the object model.
msoControlLabelEx Extended label. Cannot be created through the object model.
msoControlOCXDropdown OCX drop-down list. Cannot be created through the object model.
msoControlPane Pane. Cannot be created through the object model.
msoControlPopup Pop-up.
msoControlSpinner Spinner. Cannot be created through the object model.
msoControlSplitButtonMRUPopup Most Recently Used (MRU) pop-up. Cannot be created through the object model.
msoControlSplitButtonPopup Split button pop-up. Cannot be created through the object model.
msoControlSplitDropdown Split drop-down list. Cannot be created through the object model.
msoControlSplitExpandingGrid Split expanding grid. Cannot be created through the object model.
msoControlWorkPane Work 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

你可能感兴趣的:(Office)