Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

WordStructuredDocumentTag

OfficeIMO.Word

Namespace
OfficeIMO.Word
Assembly
OfficeIMO.Word
Source revision
0eef6a5756b9 with working tree changes

Represents a structured document tag (content control) within a Word document.

Inheritance

Usage

Explore 19 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.

Methods

public void Remove() #

Removes the structured document tag from the document.

public WordStructuredDocumentTag SetBold(bool isBold = true) #

Sets the content control text to bold and returns the instance for chaining.

Parameters

isBold bool = true optional
Whether the text should be bold.
public WordStructuredDocumentTag SetColor(OfficeColor? color) #

Sets the text color and returns the instance for chaining.

Parameters

color OfficeIMO.OfficeColor? required
Text color, or null to clear.
public WordStructuredDocumentTag SetFontFamily(string fontFamily) #

Sets the font family and returns the instance for chaining.

Parameters

fontFamily string required
Name of the font family.
public WordStructuredDocumentTag SetFontSize(OfficeLength fontSize) #

Sets the font size in points and returns the instance for chaining.

Parameters

fontSize OfficeIMO.OfficeLength required
Font size in points.
public WordStructuredDocumentTag SetHighlight(WordHighlightColor? highlight) #

Sets the highlight color and returns the instance for chaining.

Parameters

highlight OfficeIMO.Word.WordHighlightColor? required
Highlight color, or null to clear.
public WordStructuredDocumentTag SetItalic(bool isItalic = true) #

Sets the content control text to italic and returns the instance for chaining.

Parameters

isItalic bool = true optional
Whether the text should be italic.
public WordStructuredDocumentTag SetUnderline(WordUnderlineStyle? underline) #

Sets the underline style and returns the instance for chaining.

Parameters

underline OfficeIMO.Word.WordUnderlineStyle? required
Underline style, or null to clear.

Properties

public string? Alias { get; } #

Gets the alias associated with this content control.

public string? Tag { get; set; } #

Gets or sets the tag value for this content control.

public string? Text { get; set; } #

Gets or sets the inner text of the content control.

public bool Bold { get; set; } #

Gets or sets a value indicating whether the content control text is bold.

public bool Italic { get; set; } #

Gets or sets a value indicating whether the content control text is italic.

public WordUnderlineStyle? Underline { get; set; } #

Gets or sets the underline style for the content control text.

public OfficeLength? FontSize { get; set; } #

Gets or sets the font size in points for the content control text.

public string? FontFamily { get; set; } #

Gets or sets the font family for the content control text.

public OfficeColor? Color { get; set; } #

Gets or sets the text color using WordStructuredDocumentTag.Color.

public WordHighlightColor? Highlight { get; set; } #

Gets or sets the highlight color applied to the content control text.