Label Class

Definition

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

public ref class Label : System::Windows::Forms::Label
[System.ComponentModel.DefaultEvent("Click")]
[System.ComponentModel.DefaultProperty("Text")]
[System.ComponentModel.ToolboxItem(false)]
public class Label : System.Windows.Forms.Label
[<System.ComponentModel.DefaultEvent("Click")>]
[<System.ComponentModel.DefaultProperty("Text")>]
[<System.ComponentModel.ToolboxItem(false)>]
type Label = class
    inherit Label
Public Class Label
Inherits Label
Inheritance
Label
Attributes

Remarks

The Microsoft.Office.Tools.Word.Controls.Label is different from a System.Windows.Forms.Label. The Microsoft.Office.Tools.Word.Controls.Label 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 Label. Use the AddLabel method to add a new Label to a document.

Properties

AltHTML
Automation
Bottom

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

Height

Gets or sets the height of the Label.

InlineShape

Gets the underlying InlineShape of the Label.

Left

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

Right

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

Shape

Gets the underlying Shape of the Label.

Top

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

Width

Gets or sets the width of the Label in points.

Methods

Activate()

Activates the Label.

Delete()

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

Select()

Selects the Label.

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

Applies to