OfficeIMO

API Reference

Class

PowerPointTextBox

Namespace OfficeIMO.PowerPoint
Assembly OfficeIMO.PowerPoint

Represents a textbox shape.

Inheritance

Methods

public PowerPointParagraph AddBullet(String text) #
Returns: PowerPointParagraph

Adds a new bulleted paragraph to the textbox.

Parameters

text System.String requiredposition: 0
public IReadOnlyList<PowerPointParagraph> AddBullets(IEnumerable<String> bullets, Int32 level = 0, Char bulletChar = '•', Action<PowerPointParagraph> configure = null) #
Returns: IReadOnlyList<PowerPointParagraph>

Adds a bulleted list to the textbox.

Parameters

bullets System.Collections.Generic.IEnumerable{System.String} requiredposition: 0
level System.Int32 = 0 optionalposition: 1
bulletChar System.Char = '•' optionalposition: 2
configure System.Action{OfficeIMO.PowerPoint.PowerPointParagraph} = null optionalposition: 3
AddNumberedItem 2 overloads
public PowerPointParagraph AddNumberedItem(String text, TextAutoNumberSchemeValues style, Int32 startAt = 1) #
Returns: PowerPointParagraph

Adds a numbered item to the textbox.

Parameters

text System.String requiredposition: 0
style DocumentFormat.OpenXml.Drawing.TextAutoNumberSchemeValues requiredposition: 1
startAt System.Int32 = 1 optionalposition: 2
public PowerPointParagraph AddNumberedItem(String text, Int32 startAt = 1) #
Returns: PowerPointParagraph

Adds a numbered item to the textbox using the default numbering style.

Parameters

text System.String requiredposition: 0
startAt System.Int32 = 1 optionalposition: 1
AddNumberedList 2 overloads
public IReadOnlyList<PowerPointParagraph> AddNumberedList(IEnumerable<String> items, TextAutoNumberSchemeValues style, Int32 startAt = 1, Int32 level = 0, Action<PowerPointParagraph> configure = null) #
Returns: IReadOnlyList<PowerPointParagraph>

Adds a numbered list to the textbox.

Parameters

items System.Collections.Generic.IEnumerable{System.String} requiredposition: 0
style DocumentFormat.OpenXml.Drawing.TextAutoNumberSchemeValues requiredposition: 1
startAt System.Int32 = 1 optionalposition: 2
level System.Int32 = 0 optionalposition: 3
configure System.Action{OfficeIMO.PowerPoint.PowerPointParagraph} = null optionalposition: 4
public IReadOnlyList<PowerPointParagraph> AddNumberedList(IEnumerable<String> items, Int32 startAt = 1, Int32 level = 0, Action<PowerPointParagraph> configure = null) #
Returns: IReadOnlyList<PowerPointParagraph>

Adds a numbered list to the textbox using the default numbering style.

Parameters

items System.Collections.Generic.IEnumerable{System.String} requiredposition: 0
startAt System.Int32 = 1 optionalposition: 1
level System.Int32 = 0 optionalposition: 2
configure System.Action{OfficeIMO.PowerPoint.PowerPointParagraph} = null optionalposition: 3
public PowerPointParagraph AddParagraph(String text = "", Action<PowerPointParagraph> configure = null, Action<PowerPointTextRun> run = null) #
Returns: PowerPointParagraph

Adds a paragraph to the textbox.

Parameters

text System.String = "" optionalposition: 0
configure System.Action{OfficeIMO.PowerPoint.PowerPointParagraph} = null optionalposition: 1
run System.Action{OfficeIMO.PowerPoint.PowerPointTextRun} = null optionalposition: 2
public IReadOnlyList<PowerPointParagraph> AddParagraphs(IEnumerable<String> paragraphs, Action<PowerPointParagraph> configure = null) #
Returns: IReadOnlyList<PowerPointParagraph>

Adds multiple paragraphs to the textbox.

Parameters

paragraphs System.Collections.Generic.IEnumerable{System.String} requiredposition: 0
configure System.Action{OfficeIMO.PowerPoint.PowerPointParagraph} = null optionalposition: 1
public PowerPointTextBox ApplyAutoSpacing(Double lineSpacingMultiplier = 1.2, Nullable<Double> spaceBeforePoints = null, Nullable<Double> spaceAfterPoints = null) #
Returns: PowerPointTextBox

Applies automatic spacing defaults to the textbox paragraphs.

Parameters

lineSpacingMultiplier System.Double = 1.2 optionalposition: 0
spaceBeforePoints System.Nullable{System.Double} = null optionalposition: 1
spaceAfterPoints System.Nullable{System.Double} = null optionalposition: 2
public PowerPointTextBox ApplyParagraphStyle(PowerPointParagraphStyle style) #
Returns: PowerPointTextBox

Applies a paragraph style to the textbox.

Parameters

style OfficeIMO.PowerPoint.PowerPointParagraphStyle requiredposition: 0
public PowerPointTextBox ApplyTextStyle(PowerPointTextStyle style, Boolean applyToRuns = false) #
Returns: PowerPointTextBox

Applies a text style to the textbox.

Parameters

style OfficeIMO.PowerPoint.PowerPointTextStyle requiredposition: 0
applyToRuns System.Boolean = false optionalposition: 1
public Void Clear() #
Returns: Void

Removes all paragraphs from the textbox.

public Int32 ReplaceText(String oldValue, String newValue) #
Returns: Int32

Replaces text within the textbox while preserving run formatting.

Parameters

oldValue System.String requiredposition: 0
newValue System.String requiredposition: 1
public IReadOnlyList<PowerPointParagraph> SetBullets(IEnumerable<String> bullets, Int32 level = 0, Char bulletChar = '•', Action<PowerPointParagraph> configure = null) #
Returns: IReadOnlyList<PowerPointParagraph>

Replaces all paragraphs with a bulleted list.

Parameters

bullets System.Collections.Generic.IEnumerable{System.String} requiredposition: 0
level System.Int32 = 0 optionalposition: 1
bulletChar System.Char = '•' optionalposition: 2
configure System.Action{OfficeIMO.PowerPoint.PowerPointParagraph} = null optionalposition: 3
SetNumberedList 2 overloads
public IReadOnlyList<PowerPointParagraph> SetNumberedList(IEnumerable<String> items, TextAutoNumberSchemeValues style, Int32 startAt = 1, Int32 level = 0, Action<PowerPointParagraph> configure = null) #
Returns: IReadOnlyList<PowerPointParagraph>

Replaces all paragraphs with a numbered list.

Parameters

items System.Collections.Generic.IEnumerable{System.String} requiredposition: 0
style DocumentFormat.OpenXml.Drawing.TextAutoNumberSchemeValues requiredposition: 1
startAt System.Int32 = 1 optionalposition: 2
level System.Int32 = 0 optionalposition: 3
configure System.Action{OfficeIMO.PowerPoint.PowerPointParagraph} = null optionalposition: 4
public IReadOnlyList<PowerPointParagraph> SetNumberedList(IEnumerable<String> items, Int32 startAt = 1, Int32 level = 0, Action<PowerPointParagraph> configure = null) #
Returns: IReadOnlyList<PowerPointParagraph>

Replaces all paragraphs with a numbered list using the default numbering style.

Parameters

items System.Collections.Generic.IEnumerable{System.String} requiredposition: 0
startAt System.Int32 = 1 optionalposition: 1
level System.Int32 = 0 optionalposition: 2
configure System.Action{OfficeIMO.PowerPoint.PowerPointParagraph} = null optionalposition: 3
public IReadOnlyList<PowerPointParagraph> SetParagraphs(IEnumerable<String> paragraphs, Action<PowerPointParagraph> configure = null) #
Returns: IReadOnlyList<PowerPointParagraph>

Replaces all paragraphs with the provided content.

Parameters

paragraphs System.Collections.Generic.IEnumerable{System.String} requiredposition: 0
configure System.Action{OfficeIMO.PowerPoint.PowerPointParagraph} = null optionalposition: 1
public PowerPointTextBox SetTextAutoFit(PowerPointTextAutoFit fit, Nullable<PowerPointTextAutoFitOptions> options = null) #
Returns: PowerPointTextBox

Sets the auto-fit mode and optional Normal auto-fit options.

Parameters

fit OfficeIMO.PowerPoint.PowerPointTextAutoFit requiredposition: 0
options System.Nullable{OfficeIMO.PowerPoint.PowerPointTextAutoFitOptions} = null optionalposition: 1
public PowerPointTextBox SetTextMarginsCm(Double leftCm, Double topCm, Double rightCm, Double bottomCm) #
Returns: PowerPointTextBox

Sets all text margins in centimeters.

Parameters

leftCm System.Double requiredposition: 0
topCm System.Double requiredposition: 1
rightCm System.Double requiredposition: 2
bottomCm System.Double requiredposition: 3
public PowerPointTextBox SetTextMarginsInches(Double leftInches, Double topInches, Double rightInches, Double bottomInches) #
Returns: PowerPointTextBox

Sets all text margins in inches.

Parameters

leftInches System.Double requiredposition: 0
topInches System.Double requiredposition: 1
rightInches System.Double requiredposition: 2
bottomInches System.Double requiredposition: 3
public PowerPointTextBox SetTextMarginsPoints(Double left, Double top, Double right, Double bottom) #
Returns: PowerPointTextBox

Sets all text margins in points.

Parameters

left System.Double requiredposition: 0
top System.Double requiredposition: 1
right System.Double requiredposition: 2
bottom System.Double requiredposition: 3

Properties

public IReadOnlyList<PowerPointParagraph> Paragraphs { get; } #

Paragraphs contained in the textbox.

public String Text { get; set; } #

Text contained in the textbox.

public Boolean IsPlaceholder { get; } #

Returns true if the textbox is tied to a slide placeholder.

public Nullable<PlaceholderValues> PlaceholderType { get; set; } #

Gets or sets the placeholder type for this textbox.

public Nullable<UInt32> PlaceholderIndex { get; set; } #

Gets or sets the placeholder index for this textbox.

public Nullable<Double> TextMarginLeftPoints { get; set; } #

Gets or sets the left text margin in points.

public Nullable<Double> TextMarginRightPoints { get; set; } #

Gets or sets the right text margin in points.

public Nullable<Double> TextMarginTopPoints { get; set; } #

Gets or sets the top text margin in points.

public Nullable<Double> TextMarginBottomPoints { get; set; } #

Gets or sets the bottom text margin in points.

public Nullable<Double> TextMarginLeftCm { get; set; } #

Gets or sets the left text margin in centimeters.

public Nullable<Double> TextMarginRightCm { get; set; } #

Gets or sets the right text margin in centimeters.

public Nullable<Double> TextMarginTopCm { get; set; } #

Gets or sets the top text margin in centimeters.

public Nullable<Double> TextMarginBottomCm { get; set; } #

Gets or sets the bottom text margin in centimeters.

public Nullable<Double> TextMarginLeftInches { get; set; } #

Gets or sets the left text margin in inches.

public Nullable<Double> TextMarginRightInches { get; set; } #

Gets or sets the right text margin in inches.

public Nullable<Double> TextMarginTopInches { get; set; } #

Gets or sets the top text margin in inches.

public Nullable<Double> TextMarginBottomInches { get; set; } #

Gets or sets the bottom text margin in inches.

public Nullable<TextAnchoringTypeValues> TextVerticalAlignment { get; set; } #

Gets or sets the vertical anchoring of text inside the textbox.

public Nullable<TextVerticalValues> TextDirection { get; set; } #

Gets or sets the text direction (horizontal/vertical).

public Nullable<PowerPointTextAutoFit> TextAutoFit { get; set; } #

Gets or sets the text auto-fit behavior.

public Nullable<PowerPointTextAutoFitOptions> TextAutoFitOptions { get; set; } #

Gets or sets detailed auto-fit options (only applies to Normal auto-fit).

public Boolean Bold { get; set; } #

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

public Boolean Italic { get; set; } #

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

public Nullable<Int32> FontSize { get; set; } #

Gets or sets the font size in points.

public String FontName { get; set; } #

Gets or sets the font name.

public String Color { get; set; } #

Gets or sets the text color in hexadecimal format (e.g. "FF0000").