Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PowerPointParagraph

OfficeIMO.PowerPoint

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

Represents a paragraph within a textbox.

Inheritance

  • object
  • PowerPointParagraph

Usage

Explore 66 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 48

Accepted by parameters 18

Methods

AddField 2 overloads
public PowerPointParagraph AddField(string displayText, string fieldType, string? fieldId = null) #

Adds a dynamic DrawingML field with its current displayed text.

Parameters

displayText string required
fieldType string required
fieldId string? = null optional
public PowerPointParagraph AddField(string displayText, string fieldType, string? fieldId, Action<PowerPointTextRun>? configure) #

Adds a formatted dynamic DrawingML field with its current displayed text.

Parameters

displayText string required
fieldType string required
fieldId string? required
configure System.Action<OfficeIMO.PowerPoint.PowerPointTextRun>? required
public PowerPointTextRun AddFormattedText(string text, bool bold = false, bool italic = false, PowerPointUnderlineStyle? underline = null, bool strikethrough = false) #

Appends text as a new run with basic formatting and returns that run.

Parameters

text string required
bold bool = false optional
italic bool = false optional
underline OfficeIMO.PowerPoint.PowerPointUnderlineStyle? = null optional
strikethrough bool = false optional
public PowerPointParagraph AddLineBreak() #

Adds an explicit DrawingML line break in paragraph order.

public PowerPointTextRun AddText(string text) #

Appends text as a new run and returns that run. Formatting the returned run formats only that text; line breaks in text stay part of the same run.

Parameters

text string required
public void ClearBullet() #

Clears any bullet/numbering from the paragraph.

public int ReplaceAll(string text, string replacement, OfficeTextSearchOptions? options = null) #

Replaces literal text in the paragraph's runs.

Parameters

text string required
Text to find.
replacement string required
Replacement text. Pass null to remove each match.
options OfficeIMO.OfficeTextSearchOptions? = null optional
Comparison settings. null matches ordinally, ignoring case, inside or across words.

Returns

int The number of replaced matches.
public PowerPointParagraph SetAlignment(PowerPointTextAlignment alignment) #

Sets paragraph alignment and returns the paragraph for chaining.

Parameters

alignment OfficeIMO.PowerPoint.PowerPointTextAlignment required
public PowerPointParagraph SetBackgroundColor(OfficeColor color) #

Sets the background (highlight) color of every run in the paragraph and returns the paragraph for chaining. Use the run returned by PowerPointParagraph.AddText to format a single run.

Parameters

color OfficeIMO.OfficeColor required
public PowerPointParagraph SetBold(bool isBold = true) #

Sets the bold property of every run in the paragraph and returns the paragraph for chaining. Use the run returned by PowerPointParagraph.AddText to format a single run.

Parameters

isBold bool = true optional
public void SetBullet(char bulletChar = '•') #

Applies a character bullet to the paragraph.

Parameters

bulletChar char = '•' optional
public PowerPointParagraph SetBulletFontFamily(string fontFamily) #

Sets the bullet font and returns the paragraph for chaining.

Parameters

fontFamily string required
public PowerPointParagraph SetBulletSize(OfficeLength size) #

Sets the bullet size and returns the paragraph for chaining.

Parameters

size OfficeIMO.OfficeLength required
public PowerPointParagraph SetBulletSizePercent(int percent) #

Sets the bullet size in percent (100 = 100%) and returns the paragraph for chaining.

Parameters

percent int required
public PowerPointParagraph SetColor(OfficeColor color) #

Sets the color of every run in the paragraph and returns the paragraph for chaining. Use the run returned by PowerPointParagraph.AddText to format a single run.

Parameters

color OfficeIMO.OfficeColor required
public PowerPointParagraph SetFontFamily(string fontFamily) #

Sets the font family of every run in the paragraph and returns the paragraph for chaining. Use the run returned by PowerPointParagraph.AddText to format a single run.

Parameters

fontFamily string required
public PowerPointParagraph SetFontSize(OfficeLength size) #

Sets the font size of every run in the paragraph and returns the paragraph for chaining. Use the run returned by PowerPointParagraph.AddText to format a single run.

Parameters

size OfficeIMO.OfficeLength required
public PowerPointParagraph SetHanging(OfficeLength value) #

Sets a hanging indent and returns the paragraph for chaining.

Parameters

value OfficeIMO.OfficeLength required
public PowerPointParagraph SetIndent(OfficeLength value) #

Sets indentation and returns the paragraph for chaining.

Parameters

value OfficeIMO.OfficeLength required
public PowerPointParagraph SetItalic(bool isItalic = true) #

Sets the italic property of every run in the paragraph and returns the paragraph for chaining. Use the run returned by PowerPointParagraph.AddText to format a single run.

Parameters

isItalic bool = true optional
public PowerPointParagraph SetLeftMargin(OfficeLength value) #

Sets left margin and returns the paragraph for chaining.

Parameters

value OfficeIMO.OfficeLength required
public PowerPointParagraph SetLevel(int level) #

Sets the bullet/list level and returns the paragraph for chaining.

Parameters

level int required
public PowerPointParagraph SetLineSpacing(OfficeLength value) #

Sets line spacing and returns the paragraph for chaining.

Parameters

value OfficeIMO.OfficeLength required
public PowerPointParagraph SetLineSpacingMultiplier(double multiplier) #

Sets line spacing as a multiplier (1.0 = 100%) and returns the paragraph for chaining.

Parameters

multiplier double required
SetNumbered 3 overloads
public void SetNumbered(PowerPointNumberingScheme style, int startAt = 1) #

Applies an auto-numbered bullet to the paragraph.

Parameters

style OfficeIMO.PowerPoint.PowerPointNumberingScheme required
startAt int = 1 optional
public void SetNumbered(PowerPointNumberingScheme style) #

Applies an auto-numbered bullet to the paragraph without resetting the start value.

Parameters

style OfficeIMO.PowerPoint.PowerPointNumberingScheme required
public void SetNumbered(int startAt = 1) #

Applies a default auto-numbered bullet (Arabic period) to the paragraph.

Parameters

startAt int = 1 optional
public PowerPointParagraph SetSpaceAfter(OfficeLength value) #

Sets space after the paragraph and returns the paragraph for chaining.

Parameters

value OfficeIMO.OfficeLength required
public PowerPointParagraph SetSpaceBefore(OfficeLength value) #

Sets space before the paragraph and returns the paragraph for chaining.

Parameters

value OfficeIMO.OfficeLength required
public PowerPointParagraph SetStrikethrough(bool strikethrough = true) #

Sets the strikethrough property of every run in the paragraph and returns the paragraph for chaining. Use the run returned by PowerPointParagraph.AddText to format a single run.

Parameters

strikethrough bool = true optional
public PowerPointParagraph SetTabStops(IEnumerable<PowerPointTabStop> tabStops) #

Replaces up to 32 explicit tab stops. An empty sequence removes locally configured stops.

Parameters

tabStops System.Collections.Generic.IEnumerable<OfficeIMO.PowerPoint.PowerPointTabStop> required
public PowerPointParagraph SetText(string text) #

Sets the paragraph text and returns the paragraph for chaining.

Parameters

text string required
public PowerPointParagraph SetUnderline(bool underline = true) #

Sets the underline property of every run in the paragraph and returns the paragraph for chaining. Use the run returned by PowerPointParagraph.AddText to format a single run.

Parameters

underline bool = true optional

Properties

public string Text { get; set; } #

Text content of the paragraph.

public IReadOnlyList<PowerPointTextRun> Runs { get; } #

Runs within the paragraph.

public PowerPointTextAlignment? Alignment { get; set; } #

Gets or sets paragraph alignment.

public bool? RightToLeft { get; set; } #

Gets or sets the explicit right-to-left paragraph direction.

public int? Level { get; set; } #

Gets or sets the bullet/list level (0-8).

public string? BulletCharacter { get; } #

Gets the character bullet assigned to this paragraph, when present.

public bool IsNumbered { get; } #

Gets whether the paragraph uses PowerPoint auto-numbering.

public PowerPointNumberingScheme? NumberingScheme { get; } #

Gets the PowerPoint automatic-numbering scheme assigned to this paragraph, when present.

public int? NumberingStartAt { get; } #

Gets the explicit PowerPoint numbering start value, when present.

public OfficeLength? Indent { get; set; } #

Gets or sets paragraph indentation as a physical length.

public OfficeLength? LeftMargin { get; set; } #

Gets or sets paragraph left margin as a physical length.

public OfficeLength? LineSpacing { get; set; } #

Gets or sets line spacing as a physical length.

public double? LineSpacingMultiplier { get; set; } #

Gets or sets line spacing as a multiplier (1.0 = 100%).

public OfficeLength? SpaceBefore { get; set; } #

Gets or sets space before the paragraph as a physical length.

public OfficeLength? SpaceAfter { get; set; } #

Gets or sets space after the paragraph as a physical length.

public string? BulletFontFamily { get; set; } #

Gets or sets the bullet font name.

public OfficeLength? BulletSize { get; set; } #

Gets or sets the bullet size as a physical length.

public int? BulletSizePercent { get; set; } #

Gets or sets the bullet size in percent (100 = 100%).

public IReadOnlyList<PowerPointParagraphInline> InlineNodes { get; } #

Gets normal runs, explicit line breaks, and dynamic fields in authored paragraph order.

public IReadOnlyList<PowerPointTabStop> TabStops { get; } #

Gets the paragraph's explicit tab stops as physical lengths.