API Reference
PowerPointPresentation
Represents a PowerPoint presentation providing basic create, open and save operations.
Inheritance
- Object
- PowerPointPresentation
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
Accepted by parameters
- Method PowerPointDeckDesign.ApplyTo
- Method PowerPointDesignExtensions.AddDesignerAppendixTableSlide
- Method PowerPointDesignExtensions.AddDesignerArchitectureSlide
- Method PowerPointDesignExtensions.AddDesignerCapabilitySlide
- Method PowerPointDesignExtensions.AddDesignerCardGridSlide
- Method PowerPointDesignExtensions.AddDesignerCaseStudySlide
- Method PowerPointDesignExtensions.AddDesignerChartStorySlide
- Method PowerPointDesignExtensions.AddDesignerClosingSlide
- Method PowerPointDesignExtensions.AddDesignerComparisonSlide
- Method PowerPointDesignExtensions.AddDesignerCoverageSlide
- Method PowerPointDesignExtensions.AddDesignerExecutiveSummarySlide
- Method PowerPointDesignExtensions.AddDesignerLogoWallSlide
- Method PowerPointDesignExtensions.AddDesignerProcessSlide
- Method PowerPointDesignExtensions.AddDesignerScreenshotStorySlide
- Method PowerPointDesignExtensions.AddDesignerSectionSlide
- Method PowerPointDesignExtensions.ApplyDesignerTheme
- Method PowerPointDesignExtensions.ComposeDesignerSlide
- Method PowerPointDesignExtensions.UseDesigner
- Method PowerPointDesignExtensions.UseDesigner
- Method PowerPointDesignExtensions.UseDesigner
- Method PowerPointDesignExtensions.UseDesigner
- Method PowerPointDesignExtensions.UseDesigner
- Method PowerPointDesignExtensions.UseTemplateDesigner
- Method PowerPointExtractionExtensions.ExtractMarkdownChunks
- Extension method PowerPointPresentation.ExtractMarkdownChunks
- Method PowerPointPresentation.ImportSlide
- Method PowerPointTemplate.Inspect
- Method PowerPointTemplateInventory.ApplyBrandTo
Methods
public Void AddColumnGuides(Int32 columnCount, Int64 marginEmus, Int64 gutterEmus, Boolean includeOuterEdges = true, Boolean clearExisting = false) #VoidAdds vertical column guides based on a grid definition.
Parameters
- columnCount System.Int32
- marginEmus System.Int64
- gutterEmus System.Int64
- includeOuterEdges System.Boolean = true
- clearExisting System.Boolean = false
public Void AddColumnGuidesCm(Int32 columnCount, Double marginCm, Double gutterCm, Boolean includeOuterEdges = true, Boolean clearExisting = false) #VoidAdds vertical column guides using centimeters.
Parameters
- columnCount System.Int32
- marginCm System.Double
- gutterCm System.Double
- includeOuterEdges System.Boolean = true
- clearExisting System.Boolean = false
public Void AddGuide(PowerPointGuideOrientation orientation, Int64 positionEmus) #VoidAdds a guide to slide view.
Parameters
- orientation OfficeIMO.PowerPoint.PowerPointGuideOrientation
- positionEmus System.Int64
public Void AddGuideCm(PowerPointGuideOrientation orientation, Double positionCm) #VoidAdds a guide using centimeter measurements.
Parameters
- orientation OfficeIMO.PowerPoint.PowerPointGuideOrientation
- positionCm System.Double
public Void AddGuideInches(PowerPointGuideOrientation orientation, Double positionInches) #VoidAdds a guide using inch measurements.
Parameters
- orientation OfficeIMO.PowerPoint.PowerPointGuideOrientation
- positionInches System.Double
public Void AddGuidePoints(PowerPointGuideOrientation orientation, Double positionPoints) #VoidAdds a guide using point measurements.
Parameters
- orientation OfficeIMO.PowerPoint.PowerPointGuideOrientation
- positionPoints System.Double
public Void AddRowGuides(Int32 rowCount, Int64 marginEmus, Int64 gutterEmus, Boolean includeOuterEdges = true, Boolean clearExisting = false) #VoidAdds horizontal row guides based on a grid definition.
Parameters
- rowCount System.Int32
- marginEmus System.Int64
- gutterEmus System.Int64
- includeOuterEdges System.Boolean = true
- clearExisting System.Boolean = false
public Void AddRowGuidesCm(Int32 rowCount, Double marginCm, Double gutterCm, Boolean includeOuterEdges = true, Boolean clearExisting = false) #VoidAdds horizontal row guides using centimeters.
Parameters
- rowCount System.Int32
- marginCm System.Double
- gutterCm System.Double
- includeOuterEdges System.Boolean = true
- clearExisting System.Boolean = false
public PowerPointSectionInfo AddSection(String name, Int32 startSlideIndex) #PowerPointSectionInfoAdds a new section starting at the specified slide index.
Parameters
- name System.String
- startSlideIndex System.Int32
public PowerPointSlide AddSlide(SlideLayoutValues layoutType, Int32 masterIndex = 0) #PowerPointSlideAdds a slide using a layout type.
Parameters
- arg1 DocumentFormat.OpenXml.Presentation.SlideLayoutValues
- arg2 System.Int32 = 0
public PowerPointSlide AddSlide(String layoutName, Int32 masterIndex = 0, Boolean ignoreCase = true) #PowerPointSlideAdds a slide using a layout name.
Parameters
- layoutName System.String
- masterIndex System.Int32 = 0
- ignoreCase System.Boolean = true
public PowerPointSlide AddSlide(Int32 masterIndex = 0, Int32 layoutIndex = 0) #PowerPointSlideAdds a new slide using the specified master and layout indexes.
Parameters
- masterIndex System.Int32 = 0
- Index of the slide master.
- layoutIndex System.Int32 = 0
- Index of the slide layout.
public PowerPointSlide AddSlide(PowerPointTemplateLayoutInfo layout) #PowerPointSlideAdds a slide using a layout selected from a template inventory.
Parameters
- layout OfficeIMO.PowerPoint.PowerPointTemplateLayoutInfo
public PowerPointPaginatedTableResult AddTableSlides<T>(IEnumerable<T> data, IEnumerable<PowerPointTableColumn<T>> columns, PowerPointTablePaginationOptions options = null) #PowerPointPaginatedTableResultType Parameters
- T
Parameters
- data IEnumerable<T>
- columns IEnumerable<PowerPointTableColumn<T>>
- options PowerPointTablePaginationOptions = null
AddTableSlides``1(System.Collections.Generic.IEnumerable{``0} data, System.Collections.Generic.IEnumerable{OfficeIMO.PowerPoint.PowerPointTableColumn{``0}} columns, OfficeIMO.PowerPoint.PowerPointTablePaginationOptions options) #Adds as many slides as required to represent every data row in native PowerPoint tables. Capacity is measured from the table box and minimum row height, and headers repeat by default.
Parameters
- data System.Collections.Generic.IEnumerable{``0}
- columns System.Collections.Generic.IEnumerable{OfficeIMO.PowerPoint.PowerPointTableColumn{``0}}
- options OfficeIMO.PowerPoint.PowerPointTablePaginationOptions
public Void ClearSlides() #VoidRemoves all slides while preserving reusable template masters, layouts, themes, and assets.
public PowerPointCompositionResult Compose(PowerPointDeckPlan plan, PowerPointCompositionOptions options) #PowerPointCompositionResultComposes a semantic deck plan into this presentation through the single shared layout engine.
Parameters
- plan OfficeIMO.PowerPoint.PowerPointDeckPlan
- Semantic slide intent to render.
- options OfficeIMO.PowerPoint.PowerPointCompositionOptions
- Design, continuation, template-layout, validation, and preflight policy.
Returns
The resolved plan, design, rendered slides, and preflight report.
public static PowerPointPresentation Create(String filePath) #PowerPointPresentationCreates a new PowerPoint presentation at the specified file path.
Parameters
- filePath System.String
- Path where the presentation file will be created.
public static PowerPointPresentation Create(Stream stream, PowerPointStreamCreateOptions options = null) #PowerPointPresentationCreates a new PowerPoint presentation in memory and optionally persists it to the provided stream on dispose.
Parameters
- stream System.IO.Stream
- Destination stream for the presentation package.
- options OfficeIMO.PowerPoint.PowerPointStreamCreateOptions = null
- Stream persistence options. The source stream remains caller-owned.
CreateFromTemplate(System.String arg1, System.String arg2, OfficeIMO.PowerPoint.PowerPointTemplateCreationOptions arg3) #Copies a `.pptx` or `.potx` template into a new editable `.pptx`, preserving its masters, layouts, theme, relationships, and assets while applying an explicit source-slide policy.
Parameters
- arg1 System.String
- arg2 System.String
- arg3 OfficeIMO.PowerPoint.PowerPointTemplateCreationOptions
public virtual Void Dispose() #Voidpublic PowerPointSlide DuplicateSlide(Int32 index, Nullable<Int32> insertAt = null) #PowerPointSlideDuplicates a slide and inserts it into the presentation.
Parameters
- index System.Int32
- Index of the slide to duplicate.
- insertAt System.Nullable{System.Int32} = null
- Index where the duplicate should be inserted. Defaults to index + 1.
public PowerPointTextBox EnsureLayoutDateTimePlaceholderTextBox(Int32 masterIndex = 0, Int32 layoutIndex = 0, String text = null, Nullable<PowerPointLayoutBox> bounds = null, Nullable<UInt32> index = null) #PowerPointTextBoxEnsures a native date/time placeholder exists on the specified slide layout.
Parameters
- masterIndex System.Int32 = 0
- layoutIndex System.Int32 = 0
- text System.String = null
- bounds System.Nullable{OfficeIMO.PowerPoint.PowerPointLayoutBox} = null
- index System.Nullable{System.UInt32} = null
public PowerPointTextBox EnsureLayoutPlaceholderTextBox(Int32 masterIndex, Int32 layoutIndex, PlaceholderValues placeholderType, Nullable<UInt32> index = null, Nullable<PowerPointLayoutBox> bounds = null, String name = null) #PowerPointTextBoxEnsures a layout placeholder textbox exists, creating it if missing.
Parameters
- masterIndex System.Int32
- layoutIndex System.Int32
- placeholderType DocumentFormat.OpenXml.Presentation.PlaceholderValues
- index System.Nullable{System.UInt32} = null
- bounds System.Nullable{OfficeIMO.PowerPoint.PowerPointLayoutBox} = null
- name System.String = null
public PowerPointTextBox EnsureLayoutSlideNumberPlaceholderTextBox(Int32 masterIndex = 0, Int32 layoutIndex = 0, String text = null, Nullable<PowerPointLayoutBox> bounds = null, Nullable<UInt32> index = null) #PowerPointTextBoxEnsures a native slide-number placeholder exists on the specified slide layout.
Parameters
- masterIndex System.Int32 = 0
- layoutIndex System.Int32 = 0
- text System.String = null
- bounds System.Nullable{OfficeIMO.PowerPoint.PowerPointLayoutBox} = null
- index System.Nullable{System.UInt32} = null
public IReadOnlyList<OfficeImageExportResult> ExportImages(OfficeImageExportFormat format, PowerPointPresentationImageExportOptions options = null) #IReadOnlyList<OfficeImageExportResult>Exports presentation slides as PNG or SVG images.
Parameters
- format OfficeIMO.Drawing.OfficeImageExportFormat
- options OfficeIMO.PowerPoint.PowerPointPresentationImageExportOptions = null
public Void ExportSlide(Int32 slideIndex, Stream destination) #VoidExports a single slide as a standalone one-slide PowerPoint presentation.
Parameters
- slideIndex System.Int32
- Zero-based index of the slide to export.
- filePath System.String
- Destination .pptx path.
ExportSlide(System.Int32 slideIndex, System.IO.Stream destination) #Exports a single slide as a standalone one-slide PowerPoint presentation.
Parameters
- slideIndex System.Int32
- Zero-based index of the slide to export.
- destination System.IO.Stream
- Writable destination stream.
public IReadOnlyList<PowerPointGuideInfo> GetGuides() #IReadOnlyList<PowerPointGuideInfo>Returns the current guides defined for slide view.
public Int32 GetLayoutIndex(SlideLayoutValues layoutType, Int32 masterIndex = 0) #Int32Finds a layout index by layout type.
Parameters
- layoutType DocumentFormat.OpenXml.Presentation.SlideLayoutValues
- masterIndex System.Int32 = 0
public Int32 GetLayoutIndex(String layoutName, Int32 masterIndex = 0, Boolean ignoreCase = true) #Int32Finds a layout index by layout name.
Parameters
- layoutName System.String
- masterIndex System.Int32 = 0
- ignoreCase System.Boolean = true
public PowerPointTextBox GetLayoutPlaceholderTextBox(Int32 masterIndex, Int32 layoutIndex, PlaceholderValues placeholderType, Nullable<UInt32> index = null) #PowerPointTextBoxRetrieves a layout placeholder textbox for a master/layout pair.
Parameters
- masterIndex System.Int32
- layoutIndex System.Int32
- placeholderType DocumentFormat.OpenXml.Presentation.PlaceholderValues
- index System.Nullable{System.UInt32} = null
public IReadOnlyList<PowerPointSectionInfo> GetSections() #IReadOnlyList<PowerPointSectionInfo>Returns the sections defined in the presentation.
public IReadOnlyList<PowerPointSlideLayoutInfo> GetSlideLayouts(Int32 masterIndex = 0) #IReadOnlyList<PowerPointSlideLayoutInfo>Returns the layouts available for a slide master.
Parameters
- masterIndex System.Int32 = 0
public String GetThemeColor(PowerPointThemeColor color, Int32 masterIndex = 0) #StringGets a theme color value in hex format (e.g. "FF0000").
Parameters
- color OfficeIMO.PowerPoint.PowerPointThemeColor
- masterIndex System.Int32 = 0
public IReadOnlyDictionary<PowerPointThemeColor, String> GetThemeColors(Int32 masterIndex = 0) #IReadOnlyDictionary<PowerPointThemeColor, String>Returns the theme colors that are defined on the master.
Parameters
- masterIndex System.Int32 = 0
public PowerPointThemeFontSet GetThemeFonts(Int32 masterIndex = 0) #PowerPointThemeFontSetGets the major/minor fonts (Latin, East Asian, and complex script).
Parameters
- masterIndex System.Int32 = 0
public PowerPointThemeFontInfo GetThemeLatinFonts(Int32 masterIndex = 0) #PowerPointThemeFontInfoGets the major/minor Latin fonts for the theme.
Parameters
- masterIndex System.Int32 = 0
public PowerPointSlide ImportSlide(PowerPointPresentation sourcePresentation, Int32 sourceIndex, Nullable<Int32> insertAt = null) #PowerPointSlideImports a slide from another presentation and inserts it into the current presentation.
Parameters
- sourcePresentation OfficeIMO.PowerPoint.PowerPointPresentation
- Presentation to import from.
- sourceIndex System.Int32
- Index of the slide to import.
- insertAt System.Nullable{System.Int32} = null
- Index where the imported slide should be inserted. Defaults to end.
public PowerPointInspectionReport Inspect(PowerPointInspectionOptions options = null) #PowerPointInspectionReportRuns a coherent set of inspections over the current presentation without changing it.
Parameters
- options OfficeIMO.PowerPoint.PowerPointInspectionOptions = null
public PowerPointAccessibilityReport InspectAccessibility(PowerPointAccessibilityOptions options = null) #PowerPointAccessibilityReportInspects generated or imported slides against a structured accessibility policy.
Parameters
- options OfficeIMO.PowerPoint.PowerPointAccessibilityOptions = null
public PowerPointAnimationReport InspectAnimations() #PowerPointAnimationReportInspects slide timing trees before any animation authoring is attempted.
public PowerPointFeatureReport InspectFeatures() #PowerPointFeatureReportInspects presentation features and reports which ones OfficeIMO can edit, partially edit, preserve, or does not support yet.
public PowerPointDeckPreflightReport InspectPreflight(PowerPointDeckPreflightOptions options = null) #PowerPointDeckPreflightReportInspects authored slide bounds, measured text fit, peer collisions, image relationships, and shared visual-snapshot diagnostics without changing the presentation.
Parameters
- options OfficeIMO.PowerPoint.PowerPointDeckPreflightOptions = null
public PowerPointReviewReport InspectReviewComments() #PowerPointReviewReportInspects classic and modern comments without mutating review markup.
public PowerPointSignatureReport InspectSignatures() #PowerPointSignatureReportInspects package signature metadata without mutating it.
public PowerPointVisualProofReport InspectVisuals(String sourceKind = "generated") #PowerPointVisualProofReportCreates structural, extraction, accessibility, PNG, SVG, and snapshot proof for every slide.
Parameters
- sourceKind System.String = "generated"
public Void MoveSlide(Int32 fromIndex, Int32 toIndex) #VoidMoves a slide from one index to another.
Parameters
- fromIndex System.Int32
- Current index of the slide.
- toIndex System.Int32
- Destination index of the slide.
public static PowerPointPresentation Open(Stream stream, PowerPointStreamOpenOptions options = null) #PowerPointPresentationOpens an existing PowerPoint presentation.
Parameters
- filePath System.String
- Path of the presentation file to open.
- mode OfficeIMO.PowerPoint.PowerPointOpenMode = null
- Open the presentation for editing or read-only inspection.
Open(System.IO.Stream stream, OfficeIMO.PowerPoint.PowerPointStreamOpenOptions options) #Opens a PowerPoint presentation from a stream.
Parameters
- stream System.IO.Stream
- Source stream containing the presentation package.
- options OfficeIMO.PowerPoint.PowerPointStreamOpenOptions
- Access and persistence options. The source stream remains caller-owned.
public static PowerPointPresentation OpenEncrypted(Stream stream, String password, PowerPointOpenMode mode = Edit) #PowerPointPresentationOpens a password-encrypted Office Open XML PowerPoint presentation.
Parameters
- filePath System.String
- Path of the encrypted presentation file to open.
- password System.String
- Password used to decrypt the presentation package.
- mode OfficeIMO.PowerPoint.PowerPointOpenMode = Edit
- Open the decrypted package for editing or read-only inspection.
OpenEncrypted(System.IO.Stream stream, System.String password, OfficeIMO.PowerPoint.PowerPointOpenMode mode) #Opens a password-encrypted Office Open XML PowerPoint presentation from a stream.
Parameters
- stream System.IO.Stream
- Source stream containing the encrypted presentation package.
- password System.String
- Password used to decrypt the presentation package.
- mode OfficeIMO.PowerPoint.PowerPointOpenMode
- Open the decrypted package for editing or read-only inspection.
public IReadOnlyList<PowerPointDeckPlanSlideRenderSummary> PreviewComposition(PowerPointDeckPlan plan, PowerPointCompositionOptions options) #IReadOnlyList<PowerPointDeckPlanSlideRenderSummary>Describes how a semantic plan will resolve without changing this presentation.
Parameters
- plan OfficeIMO.PowerPoint.PowerPointDeckPlan
- options OfficeIMO.PowerPoint.PowerPointCompositionOptions
public Void RemoveSlide(Int32 index) #VoidRemoves the slide at the specified index.
Parameters
- index System.Int32
- Index of the slide to remove.
public Boolean RenameSection(String name, String newName, Boolean ignoreCase = true) #BooleanRenames the first section matching the provided name.
Parameters
- name System.String
- newName System.String
- ignoreCase System.Boolean = true
public Int32 ReplaceText(String oldValue, String newValue, Boolean includeTables = true, Boolean includeNotes = false) #Int32Replaces text across all slides.
Parameters
- oldValue System.String
- newValue System.String
- includeTables System.Boolean = true
- includeNotes System.Boolean = false
public IReadOnlyList<OfficeImageExportResult> SaveAsImages(String folderPath, PowerPointPresentationImageExportOptions options = null) #IReadOnlyList<OfficeImageExportResult>Saves visible presentation slides as PNG files in a folder.
Parameters
- folderPath System.String
- options OfficeIMO.PowerPoint.PowerPointPresentationImageExportOptions = null
public IReadOnlyList<OfficeImageExportResult> SaveAsImages(String folderPath, OfficeImageExportFormat format, PowerPointPresentationImageExportOptions options = null) #IReadOnlyList<OfficeImageExportResult>Saves visible presentation slides as image files in a folder.
Parameters
- folderPath System.String
- format OfficeIMO.Drawing.OfficeImageExportFormat
- options OfficeIMO.PowerPoint.PowerPointPresentationImageExportOptions = null
public Void SaveEncrypted(String filePath, String password, Boolean openPowerPoint = false) #VoidSaves the presentation as a password-encrypted Office Open XML package.
Parameters
- filePath System.String
- Destination path for the encrypted presentation.
- password System.String
- Password used to encrypt the presentation package.
- openPowerPoint System.Boolean = false
- Whether to open the saved file after writing.
public Void SaveEncrypted(Stream destination, String password) #VoidSaves the presentation as a password-encrypted Office Open XML package to a stream.
Parameters
- destination System.IO.Stream
- Writable stream receiving the encrypted presentation.
- password System.String
- Password used to encrypt the presentation package.
SaveWithPreflight(OfficeIMO.PowerPoint.PowerPointDeckPreflightOptions arg1) #Runs deck preflight and saves only when no finding meets the configured failure threshold.
Parameters
- arg1 OfficeIMO.PowerPoint.PowerPointDeckPreflightOptions
public Void SetGridSpacing(Int64 xEmus, Int64 yEmus) #VoidSets grid spacing in EMUs.
Parameters
- xEmus System.Int64
- yEmus System.Int64
public Void SetGridSpacingCm(Double xCm, Double yCm) #VoidSets grid spacing in centimeters.
Parameters
- xCm System.Double
- yCm System.Double
public Void SetGridSpacingInches(Double xInches, Double yInches) #VoidSets grid spacing in inches.
Parameters
- xInches System.Double
- yInches System.Double
public Void SetGridSpacingPoints(Double xPoints, Double yPoints) #VoidSets grid spacing in points.
Parameters
- xPoints System.Double
- yPoints System.Double
public Void SetGuides(IEnumerable<PowerPointGuideInfo> guides) #VoidSets the guide list to the provided collection.
Parameters
- guides System.Collections.Generic.IEnumerable{OfficeIMO.PowerPoint.PowerPointGuideInfo}
public Void SetLayoutPlaceholderBounds(Int32 masterIndex, Int32 layoutIndex, PlaceholderValues placeholderType, PowerPointLayoutBox bounds, Nullable<UInt32> index = null, Boolean createIfMissing = false) #VoidSets layout placeholder bounds.
Parameters
- masterIndex System.Int32
- layoutIndex System.Int32
- placeholderType DocumentFormat.OpenXml.Presentation.PlaceholderValues
- bounds OfficeIMO.PowerPoint.PowerPointLayoutBox
- index System.Nullable{System.UInt32} = null
- createIfMissing System.Boolean = false
public Void SetLayoutPlaceholderTextMarginsCm(Int32 masterIndex, Int32 layoutIndex, PlaceholderValues placeholderType, Double leftCm, Double topCm, Double rightCm, Double bottomCm, Nullable<UInt32> index = null, Boolean createIfMissing = false) #VoidSets layout placeholder text margins in centimeters.
Parameters
- masterIndex System.Int32
- layoutIndex System.Int32
- placeholderType DocumentFormat.OpenXml.Presentation.PlaceholderValues
- leftCm System.Double
- topCm System.Double
- rightCm System.Double
- bottomCm System.Double
- index System.Nullable{System.UInt32} = null
- createIfMissing System.Boolean = false
public Void SetLayoutPlaceholderTextMarginsInches(Int32 masterIndex, Int32 layoutIndex, PlaceholderValues placeholderType, Double leftInches, Double topInches, Double rightInches, Double bottomInches, Nullable<UInt32> index = null, Boolean createIfMissing = false) #VoidSets layout placeholder text margins in inches.
Parameters
- masterIndex System.Int32
- layoutIndex System.Int32
- placeholderType DocumentFormat.OpenXml.Presentation.PlaceholderValues
- leftInches System.Double
- topInches System.Double
- rightInches System.Double
- bottomInches System.Double
- index System.Nullable{System.UInt32} = null
- createIfMissing System.Boolean = false
public Void SetLayoutPlaceholderTextMarginsPoints(Int32 masterIndex, Int32 layoutIndex, PlaceholderValues placeholderType, Double leftPoints, Double topPoints, Double rightPoints, Double bottomPoints, Nullable<UInt32> index = null, Boolean createIfMissing = false) #VoidSets layout placeholder text margins in points.
Parameters
- masterIndex System.Int32
- layoutIndex System.Int32
- placeholderType DocumentFormat.OpenXml.Presentation.PlaceholderValues
- leftPoints System.Double
- topPoints System.Double
- rightPoints System.Double
- bottomPoints System.Double
- index System.Nullable{System.UInt32} = null
- createIfMissing System.Boolean = false
public Void SetLayoutPlaceholderTextStyle(Int32 masterIndex, Int32 layoutIndex, PlaceholderValues placeholderType, PowerPointTextStyle style, Nullable<UInt32> index = null, Nullable<Int32> level = null, Nullable<Char> bulletChar = null, Nullable<TextAutoNumberSchemeValues> numbering = null, Boolean createIfMissing = false) #VoidSets layout placeholder text styling and optional bullet settings.
Parameters
- masterIndex System.Int32
- layoutIndex System.Int32
- placeholderType DocumentFormat.OpenXml.Presentation.PlaceholderValues
- style OfficeIMO.PowerPoint.PowerPointTextStyle
- index System.Nullable{System.UInt32} = null
- level System.Nullable{System.Int32} = null
- bulletChar System.Nullable{System.Char} = null
- numbering System.Nullable{DocumentFormat.OpenXml.Drawing.TextAutoNumberSchemeValues} = null
- createIfMissing System.Boolean = false
public Void SetThemeColor(PowerPointThemeColor color, String hexValue, Int32 masterIndex = 0) #VoidSets a theme color value in hex format (e.g. "FF0000").
Parameters
- color OfficeIMO.PowerPoint.PowerPointThemeColor
- hexValue System.String
- masterIndex System.Int32 = 0
public Void SetThemeColorForAllMasters(PowerPointThemeColor color, String hexValue) #VoidSets a theme color value across all masters.
Parameters
- color OfficeIMO.PowerPoint.PowerPointThemeColor
- hexValue System.String
public Void SetThemeColors(IDictionary<PowerPointThemeColor, String> colors, Int32 masterIndex = 0) #VoidSets multiple theme colors at once.
Parameters
- colors System.Collections.Generic.IDictionary{OfficeIMO.PowerPoint.PowerPointThemeColor,System.String}
- masterIndex System.Int32 = 0
public Void SetThemeColorsForAllMasters(IDictionary<PowerPointThemeColor, String> colors) #VoidSets multiple theme colors across all masters.
Parameters
- colors System.Collections.Generic.IDictionary{OfficeIMO.PowerPoint.PowerPointThemeColor,System.String}
public Void SetThemeFonts(PowerPointThemeFontSet fonts, Int32 masterIndex = 0, Boolean keepExistingWhenNull = true) #VoidSets the major/minor fonts (Latin, East Asian, and complex script).
Parameters
- fonts OfficeIMO.PowerPoint.PowerPointThemeFontSet
- masterIndex System.Int32 = 0
- keepExistingWhenNull System.Boolean = true
public Void SetThemeFontsForAllMasters(PowerPointThemeFontSet fonts, Boolean keepExistingWhenNull = true) #VoidSets the major/minor fonts (Latin, East Asian, and complex script) across all masters.
Parameters
- fonts OfficeIMO.PowerPoint.PowerPointThemeFontSet
- keepExistingWhenNull System.Boolean = true
public Void SetThemeLatinFonts(String majorLatin, String minorLatin, Int32 masterIndex = 0) #VoidSets the major/minor Latin fonts for the theme.
Parameters
- majorLatin System.String
- minorLatin System.String
- masterIndex System.Int32 = 0
public Void SetThemeLatinFontsForAllMasters(String majorLatin, String minorLatin) #VoidSets the major/minor Latin fonts across all masters.
Parameters
- majorLatin System.String
- minorLatin System.String
public Void SetThemeNameForAllMasters(String name) #VoidSets the theme name across all masters.
Parameters
- name System.String
public PowerPointPresentationImageExportBuilder ToImages() #PowerPointPresentationImageExportBuilderStarts a fluent image export for selected slides in this presentation.
public List<ValidationErrorInfo> ValidateDocument(FileFormatVersions fileFormatVersions = Microsoft365) #List<ValidationErrorInfo>Validates the presentation using the specified file format version.
Parameters
- fileFormatVersions DocumentFormat.OpenXml.FileFormatVersions = Microsoft365
- File format version to validate against.
Returns
List of validation errors.
Examples
using (var presentation = PowerPointPresentation.Create("test.pptx")) {
var errors = presentation.ValidateDocument();
if (errors.Count > 0) {
// Handle validation errors
}
}
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public IReadOnlyList<PowerPointSlide> Slides { get; } #Collection of slides in the presentation.
public PowerPointBuiltinDocumentProperties BuiltinDocumentProperties { get; } #Built-in package properties for the presentation.
public PowerPointApplicationProperties ApplicationProperties { get; } #Extended application properties for the presentation.
public PowerPointSlideSize SlideSize { get; } #Slide size information for the presentation.
public String ThemeName { get; set; } #Gets or sets the name of the presentation theme.
public IReadOnlyList<PowerPointTableStyleInfo> TableStyles { get; } #Gets the list of table styles available in the presentation.
public Boolean DocumentIsValid { get; } #Indicates whether the presentation passes Open XML validation.
public List<ValidationErrorInfo> DocumentValidationErrors { get; } #Gets the list of validation errors for the presentation.
public Boolean SnapToGrid { get; set; } #Gets or sets whether slide view snapping uses the grid.
public Int64 GridSpacingXEmus { get; set; } #Horizontal grid spacing in EMUs.
public Int64 GridSpacingYEmus { get; set; } #Vertical grid spacing in EMUs.
public PowerPointSignatureMutationPolicy SignatureMutationPolicy { get; set; } #Signature policy applied before save. The safe default blocks mutation of signed packages.
public PowerPointSignatureReport LastSignatureReport { get; set; } #Report produced by the latest signature inspection or save policy check.
Extension Methods
public static IEnumerable<PowerPointExtractChunk> ExtractMarkdownChunks(PowerPointPresentation presentation, PowerPointExtractOptions extract = null, PowerPointExtractChunkingOptions chunking = null, String sourcePath = null, CancellationToken cancellationToken = null) #IEnumerable<PowerPointExtractChunk>Extracts a presentation into slide-aligned chunks (one chunk per slide by default).
Parameters
- presentation OfficeIMO.PowerPoint.PowerPointPresentation
- extract OfficeIMO.PowerPoint.PowerPointExtractionExtensions.PowerPointExtractOptions = null
- chunking OfficeIMO.PowerPoint.PowerPointExtractChunkingOptions = null
- sourcePath System.String = null
- cancellationToken System.Threading.CancellationToken = null