Button Class

Definition

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

[System.ComponentModel.DefaultEvent("Click")]
[System.ComponentModel.DefaultProperty("Text")]
[System.ComponentModel.ToolboxItem(false)]
public class Button : System.Windows.Forms.Button
Inheritance
Button
Attributes

Remarks

The Microsoft.Office.Tools.Word.Controls.Button is different from a System.Windows.Forms.Button. The Microsoft.Office.Tools.Word.Controls.Button has additional members that enable it to be added to a Word document and that give it additional methods and properties.

Do not use the constructor to create a new Button. Use the AddButton method to add a new Button to a document.

Properties

AltHTML
Automation
Bottom

Gets the distance, in points, between the bottom edge of the Button and the top edge of the document.

Height

Gets or sets the height of the Button.

InlineShape

Gets the underlying InlineShape of the Button.

Left

Gets or sets the distance, in points, between the left edge of the Button and the left edge of the document.

Right

Gets the distance, in points, between the right edge of the Button and the left edge of the document.

Shape

Gets the underlying Shape of the Button.

Top

Gets or sets the distance, in points, between the top edge of the Button and the top edge of the document.

Width

Gets or sets the width of the Button in points.

Methods

Activate()

Activates the Button.

Delete()

Deletes a dynamically created Button from the document and removes it from the ControlCollection.

Select()

Selects the Button.

SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
SetVisibleCore(Boolean)

Applies to