共用方式為


Microsoft.Office.Tools.Word.Controls Namespace

The Microsoft.Office.Tools.Word.Controls namespace contains a set of Windows Forms controls that can be used on a Document host item in an Office solution. Each of these classes extends a base class that is in the System.Windows.Forms namespace with additional functionality specific to a Microsoft Office Word document. For example, the Button class extends the functionality of the Button class.

Classes

Button

Represents a Windows Forms button that can be added to a Microsoft Office Word document.

CheckBox

Represents a Windows Forms check box that can be added to a Microsoft Office Word document.

CheckedListBox

Represents a Windows Forms checked list box that can be added to a Microsoft Office Word document.

ComboBox

Represents a Windows Forms combo box that can be added to a Microsoft Office Word document.

DataGridView

Represents a Windows Forms DataGridView that can be added to a Microsoft Office Word document.

DateTimePicker

Represents a Windows Forms DateTimePicker control that can be added to a Microsoft Office Word document.

DomainUpDown

Represents a Windows Forms DomainUpDown that can be added to a Microsoft Office Word document.

HScrollBar

Represents a Windows Forms HScrollBar that can be added to a Microsoft Office Word document.

Label

Represents a Windows Forms Label that can be added to a Microsoft Office Word document.

LinkLabel

Represents a Windows Forms LinkLabel that can be added to a Microsoft Office Word document.

ListBox

Represents a Windows Forms ListBox that can be added to a Microsoft Office Word document.

ListView

Represents a Windows Forms ListView that can be added to a Microsoft Office Word document.

MaskedTextBox

Represents a Windows Forms MaskedTextBox that can be added to a Microsoft Office Word document.

MonthCalendar

Represents a Windows Forms MonthCalendar that can be added to a Microsoft Office Word document.

NumericUpDown

Represents a Windows Forms NumericUpDown that can be added to a Microsoft Office Word document.

PictureBox

Represents a Windows Forms PictureBox that can be added to a Microsoft Office Word document.

ProgressBar

Represents a Windows Forms ProgressBar that can be added to a Microsoft Office Word document.

PropertyGrid

Represents a Windows Forms PropertyGrid that can be added to a Microsoft Office Word document.

RadioButton

Represents a Windows Forms RadioButton that can be added to a Microsoft Office Word document.

RichTextBox

Represents a Windows Forms RichTextBox that can be added to a Microsoft Office Word document.

TextBox

Represents a Windows Forms TextBox that can be added to a Microsoft Office Word document.

TrackBar

Represents a Windows Forms TrackBar that can be added to a Microsoft Office Word document.

TreeView

Represents a Windows Forms TreeView that can be added to a Microsoft Office Word document.

VScrollBar

Represents a Windows Forms VScrollBar that can be added to a Microsoft Office Word document.

WebBrowser

Represents a Windows Forms WebBrowser that can be added to a Microsoft Office Word document.

Remarks

You can add and remove the controls in this namespace at run time by using the appropriate method. For example, use the AddButton method to add a Microsoft.Office.Tools.Word.Controls.Button to a document at run time. For more information, see Adding Controls to Office Documents at Run Time.

In a document-level project for Word, you can also add the controls in this namespace to your Word document at design time by dragging a control from the Toolbox directly to your document. For more information, see How to: Add Windows Forms Controls to Office Documents.

There are some differences between Windows Forms controls that are added to Word documents and Windows Forms controls that are added to Windows Forms. For more information, see Limitations of Windows Forms Controls on Office Documents.