WordTextBox
OfficeIMO.Word
WordTextBox class
Inheritance
- WordElement
- WordTextBox
Usage
Explore 14 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 14
- Method WordDocument.AddTextBox
- Method WordDocument.AddTextBoxVml
- Property WordDocument.TextBoxes
- Property WordFooter.TextBoxes
- Method WordHeader.AddTextBox
- Method WordHeader.AddTextBoxVml
- Property WordHeader.TextBoxes
- Property WordHeaderFooter.TextBoxes
- Method WordParagraph.AddTextBox
- Method WordParagraph.AddTextBoxVml
- Property WordParagraph.TextBox
- Method WordSection.AddTextBox
- Method WordSection.AddTextBoxVml
- Property WordSection.TextBoxes
Constructors
public WordTextBox(WordDocument wordDocument, string text, WordImageTextWrapping wrapTextImage) #Add a new text box to the document
Parameters
- wordDocument OfficeIMO.Word.WordDocument
- text string
- wrapTextImage OfficeIMO.Word.WordImageTextWrapping
public WordTextBox(WordDocument wordDocument, WordParagraph paragraph, string text, WordImageTextWrapping wrapTextImage) #Create a text box from an existing paragraph
Parameters
- wordDocument OfficeIMO.Word.WordDocument
- paragraph OfficeIMO.Word.WordParagraph
- text string
- wrapTextImage OfficeIMO.Word.WordImageTextWrapping
Methods
public void Remove() #Removes the text box from the document along with the paragraph
Inherited Methods
Properties
public List<WordParagraph> Paragraphs { get; } #Gets a list of WordParagraph instances representing the paragraphs in the text box. Each WordParagraph is initialized with the WordDocument, the Paragraph, and the Run.
public List<WordElement> Elements { get; } #Gets the direct child elements contained in the text box in document order.
public string? Description { get; set; } #Gets or sets the accessibility description for the text box.
public WordHorizontalRelativePosition? HorizontalPositionRelativeFrom { get; set; } #Gets or sets horizontal relative position of the text box
public WordImageTextWrapping? WrapText { get; set; } #Gets or sets the wrap text of the text box
public WordTextBoxHorizontalAlignment HorizontalAlignment { get; set; } #Gets or sets the horizontal alignment of the text box
public WordVerticalRelativePosition VerticalPositionRelativeFrom { get; set; } #Gets or sets the relative4 vertical alignment of the text box
public OfficeLength? VerticalPositionOffset { get; set; } #Gets or sets the explicit vertical anchor offset as a physical length. Setting an offset replaces vertical alignment. Null preserves the existing offset.
public OfficeLength? HorizontalPositionOffset { get; set; } #Gets or sets the explicit horizontal anchor offset as a physical length. Setting an offset replaces horizontal alignment. Null preserves the existing offset.
public int? RelativeWidthPercentage { get; set; } #Gets or sets the relative width percentage
public int? RelativeHeightPercentage { get; set; } #Gets or sets the relative height percentage
public WordTextBoxAutoFitType AutoFit { get; set; } #Gets or sets the AutoFit behavior for the textbox.
public bool AutoFitToTextSize { get; set; } #Gets or sets whether the textbox resizes to fit text. Use WordTextBox.AutoFit for more options.
public WordTextBoxHorizontalSizeReference? SizeRelativeHorizontally { get; set; } #Sets size relative horizontally
public OfficeLength Width { get; set; } #Gets or sets the physical frame width of an anchored or inline text box. Relative sizing remains controlled by RelativeWidthPercentage.
public OfficeLength Height { get; set; } #Gets or sets the physical frame height of an anchored or inline text box. Relative sizing remains controlled by RelativeHeightPercentage.
public OfficeColor? FillColor { get; set; } #Gets or sets the DrawingML text-box solid RGB fill color; null removes the solid fill.
public uint ZOrder { get; set; } #Gets or sets the native DrawingML anchor stacking order.