WordStructuredDocumentTag
OfficeIMO.Word
Represents a structured document tag (content control) within a Word document.
Inheritance
- WordElement
- WordStructuredDocumentTag
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.
Returned or exposed by 19
- Method WordDocument.AddStructuredDocumentTag
- Method WordDocument.GetStructuredDocumentTagByAlias
- Method WordDocument.GetStructuredDocumentTagByTag
- Property WordDocument.StructuredDocumentTags
- Property WordDocument.TextContentControls
- Property WordFooter.StructuredDocumentTags
- Property WordHeader.StructuredDocumentTags
- Property WordHeaderFooter.StructuredDocumentTags
- Method WordParagraph.AddStructuredDocumentTag
- Property WordParagraph.StructuredDocumentTag
- Property WordSection.StructuredDocumentTags
- Method WordStructuredDocumentTag.SetBold
- Method WordStructuredDocumentTag.SetColor
- Method WordStructuredDocumentTag.SetFontFamily
- Method WordStructuredDocumentTag.SetFontSize
- Method WordStructuredDocumentTag.SetHighlight
- Method WordStructuredDocumentTag.SetItalic
- Method WordStructuredDocumentTag.SetUnderline
- Property WordTable.StructuredDocumentTags
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
- Whether the text should be bold.
Returns
WordStructuredDocumentTagpublic WordStructuredDocumentTag SetColor(OfficeColor? color) #Sets the text color and returns the instance for chaining.
Parameters
- color OfficeIMO.OfficeColor?
- Text color, or null to clear.
Returns
WordStructuredDocumentTagpublic WordStructuredDocumentTag SetFontFamily(string fontFamily) #Sets the font family and returns the instance for chaining.
Parameters
- fontFamily string
- Name of the font family.
Returns
WordStructuredDocumentTagpublic WordStructuredDocumentTag SetFontSize(OfficeLength fontSize) #Sets the font size in points and returns the instance for chaining.
Parameters
- fontSize OfficeIMO.OfficeLength
- Font size in points.
Returns
WordStructuredDocumentTagpublic WordStructuredDocumentTag SetHighlight(WordHighlightColor? highlight) #Sets the highlight color and returns the instance for chaining.
Parameters
- highlight OfficeIMO.Word.WordHighlightColor?
- Highlight color, or null to clear.
Returns
WordStructuredDocumentTagpublic WordStructuredDocumentTag SetItalic(bool isItalic = true) #Sets the content control text to italic and returns the instance for chaining.
Parameters
- isItalic bool = true
- Whether the text should be italic.
Returns
WordStructuredDocumentTagpublic WordStructuredDocumentTag SetUnderline(WordUnderlineStyle? underline) #Sets the underline style and returns the instance for chaining.
Parameters
- underline OfficeIMO.Word.WordUnderlineStyle?
- Underline style, or null to clear.
Returns
WordStructuredDocumentTagInherited Methods
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.