# PowerPointDocumentScope

Edits one PowerPointDocument: its fluent methods and keywords, each returning this scope.

Class 

`OfficeIMO.PowerPoint`

**Namespace**

`OfficeIMO.PowerPoint`

**Assembly**

`OfficeIMO.PowerPoint`

**Source revision**

`105ae88c45f6` with working tree changes

**Source**

[PowerPointScopes.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/105ae88c45f6be3bb2020384e25ffe61d990451b/Sources/OfficeIMO.PowerPoint/Scopes/PowerPointScopes.cs#L45)

**Modifiers**

sealed

Edits one [PowerPointDocument](/api/powerpoint/officeimo-powerpoint-powerpointdocument/): its fluent methods and keywords, each returning this scope.

## Inheritance

- object
- PowerPointDocumentScope

## Usage

Explore 23 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 22

- Method [PowerPointDocumentScope.ApplicationProperties](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-applicationproperties-action-officeimo-powerpoint-powerpointapplicationproperties)
- Method [PowerPointDocumentScope.DocumentValidationError](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-documentvalidationerror-officeimo-officeopenxmlvalidationerror)
- Method [PowerPointDocumentScope.DocumentValidationErrors](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-documentvalidationerrors-collections-generic-ienumerable-officeimo-officeopenxmlvalidationerror)
- Method [PowerPointDocumentScope.GridSpacing](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-gridspacing-officeimo-officelength-officeimo-officelength)
- Method [PowerPointDocumentScope.GridSpacingX](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-gridspacingx-officeimo-officelength)
- Method [PowerPointDocumentScope.GridSpacingY](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-gridspacingy-officeimo-officelength)
- Method [PowerPointDocumentScope.Guides](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-guides-collections-generic-ienumerable-officeimo-powerpoint-powerpointguideinfo)
- Method [PowerPointDocumentScope.Properties](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-properties-action-officeimo-powerpoint-powerpointbuiltindocumentproperties)
- Method [PowerPointDocumentScope.Slide](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-slide-action-officeimo-powerpoint-powerpointslidescope)
- Method [PowerPointDocumentScope.SlideSize](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-slidesize-action-officeimo-powerpoint-powerpointslidesize)
- Method [PowerPointDocumentScope.SnapToGrid](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-snaptogrid-boolean)
- Method [PowerPointDocumentScope.ThemeColor](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-themecolor-officeimo-powerpoint-powerpointthemecolor-string-int32)
- Method [PowerPointDocumentScope.ThemeColorForAllMasters](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-themecolorforallmasters-officeimo-powerpoint-powerpointthemecolor-string)
- Method [PowerPointDocumentScope.ThemeColors](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-themecolors-collections-generic-idictionary-officeimo-powerpoint-powerpointthemecolor-system-string-int32)
- Method [PowerPointDocumentScope.ThemeColorsForAllMasters](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-themecolorsforallmasters-collections-generic-idictionary-officeimo-powerpoint-powerpointthemecolor-system-string)
- Method [PowerPointDocumentScope.ThemeFonts](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-themefonts-officeimo-powerpoint-powerpointthemefontset-int32-boolean)
- Method [PowerPointDocumentScope.ThemeFontsForAllMasters](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-themefontsforallmasters-officeimo-powerpoint-powerpointthemefontset-boolean)
- Method [PowerPointDocumentScope.ThemeLatinFonts](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-themelatinfonts-string-string-int32)
- Method [PowerPointDocumentScope.ThemeLatinFontsForAllMasters](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-themelatinfontsforallmasters-string-string)
- Method [PowerPointDocumentScope.ThemeName](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-themename-string-int32)
- Method [PowerPointDocumentScope.ThemeNameForAllMasters](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-themenameforallmasters-string)
- Method [PowerPointDocumentScope.VbaProject](/api/powerpoint/officeimo-powerpoint-powerpointdocumentscope/#method-vbaproject-byte-int64)

### Accepted by parameters 1

- Method [PowerPointDocument.Create](/api/powerpoint/officeimo-powerpoint-powerpointdocument/#method-create-string-action-officeimo-powerpoint-powerpointdocumentscope-officeimo-powerpoint-powerpointcreateoptions) parameter `compose`

Filter members 

Show inherited

## Methods

`public PowerPointDocumentScope ApplicationProperties(Action<PowerPointApplicationProperties> configure)` [#](#method-applicationproperties-action-officeimo-powerpoint-powerpointapplicationproperties)

Configures [PowerPointDocument.ApplicationProperties](/api/powerpoint/officeimo-powerpoint-powerpointdocument/) in place: Extended application properties for the presentation.

Parameters

**configure System.Action<OfficeIMO.PowerPoint.PowerPointApplicationProperties> required**

Configures the value.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope DocumentValidationError(OfficeOpenXmlValidationError item)` [#](#method-documentvalidationerror-officeimo-officeopenxmlvalidationerror)

Adds an item to [PowerPointDocument.DocumentValidationErrors](/api/powerpoint/officeimo-powerpoint-powerpointdocument/): Gets the list of validation errors for the presentation.

Parameters

**item OfficeIMO.OfficeOpenXmlValidationError required**

The item.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope DocumentValidationErrors(IEnumerable<OfficeOpenXmlValidationError> items)` [#](#method-documentvalidationerrors-collections-generic-ienumerable-officeimo-officeopenxmlvalidationerror)

Adds items to [PowerPointDocument.DocumentValidationErrors](/api/powerpoint/officeimo-powerpoint-powerpointdocument/): Gets the list of validation errors for the presentation.

Parameters

**items System.Collections.Generic.IEnumerable<OfficeIMO.OfficeOpenXmlValidationError> required**

The items, in order.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope GridSpacing(OfficeLength horizontal, OfficeLength vertical)` [#](#method-gridspacing-officeimo-officelength-officeimo-officelength)

Sets horizontal and vertical grid spacing with explicit lengths.

Parameters

**horizontal OfficeIMO.OfficeLength required**

The value.

**vertical OfficeIMO.OfficeLength required**

The value.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope GridSpacingX(OfficeLength value)` [#](#method-gridspacingx-officeimo-officelength)

Sets [PowerPointDocument.GridSpacingX](/api/powerpoint/officeimo-powerpoint-powerpointdocument/): Horizontal grid spacing.

Parameters

**value OfficeIMO.OfficeLength required**

The value.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope GridSpacingY(OfficeLength value)` [#](#method-gridspacingy-officeimo-officelength)

Sets [PowerPointDocument.GridSpacingY](/api/powerpoint/officeimo-powerpoint-powerpointdocument/): Vertical grid spacing.

Parameters

**value OfficeIMO.OfficeLength required**

The value.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope Guides(IEnumerable<PowerPointGuideInfo> guides)` [#](#method-guides-collections-generic-ienumerable-officeimo-powerpoint-powerpointguideinfo)

Sets the guide list to the provided collection.

Parameters

**guides System.Collections.Generic.IEnumerable<OfficeIMO.PowerPoint.PowerPointGuideInfo> required**

The value.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope Properties(Action<PowerPointBuiltinDocumentProperties> configure)` [#](#method-properties-action-officeimo-powerpoint-powerpointbuiltindocumentproperties)

Configures [PowerPointDocument.Properties](/api/powerpoint/officeimo-powerpoint-powerpointdocument/) in place: Built-in package properties for the presentation.

Parameters

**configure System.Action<OfficeIMO.PowerPoint.PowerPointBuiltinDocumentProperties> required**

Configures the value.

Returns

`PowerPointDocumentScope` The same scope.

Slide 4 overloads

`public PowerPointDocumentScope Slide(Action<PowerPointSlideScope> configure)` [#](#method-slide-action-officeimo-powerpoint-powerpointslidescope)

[PowerPointScopes.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/105ae88c45f6be3bb2020384e25ffe61d990451b/Sources/OfficeIMO.PowerPoint/Scopes/PowerPointScopes.cs#L45)

Adds a slide with the first master's first layout and composes it.

Parameters

**configure System.Action<OfficeIMO.PowerPoint.PowerPointSlideScope> required**

Adds the slide's title, text, tables and charts.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope Slide(PowerPointSlideLayoutType layoutType, int masterIndex = 0, Action<PowerPointSlideScope>? configure = null)` [#](#method-slide-officeimo-powerpoint-powerpointslidelayouttype-int32-action-officeimo-powerpoint-powerpointslidescope)

Adds a slide using a layout type.

Parameters

**layoutType OfficeIMO.PowerPoint.PowerPointSlideLayoutType required**

The value.

**masterIndex int = 0 optional**

The value.

**configure System.Action<OfficeIMO.PowerPoint.PowerPointSlideScope>? = null optional**

Configures the new item through its scope.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope Slide(string layoutName, int masterIndex = 0, bool ignoreCase = true, Action<PowerPointSlideScope>? configure = null)` [#](#method-slide-string-int32-boolean-action-officeimo-powerpoint-powerpointslidescope)

Adds a slide using a layout name.

Parameters

**layoutName string required**

The value.

**masterIndex int = 0 optional**

The value.

**ignoreCase bool = true optional**

The value.

**configure System.Action<OfficeIMO.PowerPoint.PowerPointSlideScope>? = null optional**

Configures the new item through its scope.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope Slide(int masterIndex = 0, int layoutIndex = 0, Action<PowerPointSlideScope>? configure = null)` [#](#method-slide-int32-int32-action-officeimo-powerpoint-powerpointslidescope)

Adds a new slide using the specified master and layout indexes.

Parameters

**masterIndex int = 0 optional**

Index of the slide master.

**layoutIndex int = 0 optional**

Index of the slide layout.

**configure System.Action<OfficeIMO.PowerPoint.PowerPointSlideScope>? = null optional**

Configures the new item through its scope.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope SlideSize(Action<PowerPointSlideSize> configure)` [#](#method-slidesize-action-officeimo-powerpoint-powerpointslidesize)

Configures [PowerPointDocument.SlideSize](/api/powerpoint/officeimo-powerpoint-powerpointdocument/) in place: Slide size information for the presentation.

Parameters

**configure System.Action<OfficeIMO.PowerPoint.PowerPointSlideSize> required**

Configures the value.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope SnapToGrid(bool value = true)` [#](#method-snaptogrid-boolean)

Sets [PowerPointDocument.SnapToGrid](/api/powerpoint/officeimo-powerpoint-powerpointdocument/): Gets or sets whether slide view snapping uses the grid.

Parameters

**value bool = true optional**

The value; true when omitted.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope ThemeColor(PowerPointThemeColor color, string hexValue, int masterIndex = 0)` [#](#method-themecolor-officeimo-powerpoint-powerpointthemecolor-string-int32)

Sets a theme color value in hex format (e.g. "FF0000").

Parameters

**color OfficeIMO.PowerPoint.PowerPointThemeColor required**

The value.

**hexValue string required**

The value.

**masterIndex int = 0 optional**

The value.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope ThemeColorForAllMasters(PowerPointThemeColor color, string hexValue)` [#](#method-themecolorforallmasters-officeimo-powerpoint-powerpointthemecolor-string)

Sets a theme color value across all masters.

Parameters

**color OfficeIMO.PowerPoint.PowerPointThemeColor required**

The value.

**hexValue string required**

The value.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope ThemeColors(IDictionary<PowerPointThemeColor, string> colors, int masterIndex = 0)` [#](#method-themecolors-collections-generic-idictionary-officeimo-powerpoint-powerpointthemecolor-system-string-int32)

Sets multiple theme colors at once.

Parameters

**colors System.Collections.Generic.IDictionary<OfficeIMO.PowerPoint.PowerPointThemeColor, string> required**

The value.

**masterIndex int = 0 optional**

The value.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope ThemeColorsForAllMasters(IDictionary<PowerPointThemeColor, string> colors)` [#](#method-themecolorsforallmasters-collections-generic-idictionary-officeimo-powerpoint-powerpointthemecolor-system-string)

Sets multiple theme colors across all masters.

Parameters

**colors System.Collections.Generic.IDictionary<OfficeIMO.PowerPoint.PowerPointThemeColor, string> required**

The value.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope ThemeFonts(PowerPointThemeFontSet fonts, int masterIndex = 0, bool keepExistingWhenNull = true)` [#](#method-themefonts-officeimo-powerpoint-powerpointthemefontset-int32-boolean)

Sets the major/minor fonts (Latin, East Asian, and complex script).

Parameters

**fonts OfficeIMO.PowerPoint.PowerPointThemeFontSet required**

The value.

**masterIndex int = 0 optional**

The value.

**keepExistingWhenNull bool = true optional**

The value.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope ThemeFontsForAllMasters(PowerPointThemeFontSet fonts, bool keepExistingWhenNull = true)` [#](#method-themefontsforallmasters-officeimo-powerpoint-powerpointthemefontset-boolean)

Sets the major/minor fonts (Latin, East Asian, and complex script) across all masters.

Parameters

**fonts OfficeIMO.PowerPoint.PowerPointThemeFontSet required**

The value.

**keepExistingWhenNull bool = true optional**

The value.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope ThemeLatinFonts(string majorLatin, string minorLatin, int masterIndex = 0)` [#](#method-themelatinfonts-string-string-int32)

Sets the major/minor Latin fonts for the theme.

Parameters

**majorLatin string required**

The value.

**minorLatin string required**

The value.

**masterIndex int = 0 optional**

The value.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope ThemeLatinFontsForAllMasters(string majorLatin, string minorLatin)` [#](#method-themelatinfontsforallmasters-string-string)

Sets the major/minor Latin fonts across all masters.

Parameters

**majorLatin string required**

The value.

**minorLatin string required**

The value.

Returns

`PowerPointDocumentScope` The same scope.

ThemeName 2 overloads

`public PowerPointDocumentScope ThemeName(string name, int masterIndex = 0)` [#](#method-themename-string-int32)

Sets the name of a selected master's theme without restyling its layouts.

Parameters

**name string required**

Non-empty theme name.

**masterIndex int = 0 optional**

Zero-based master position.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope ThemeName(string value)` [#](#method-themename-string)

Sets [PowerPointDocument.ThemeName](/api/powerpoint/officeimo-powerpoint-powerpointdocument/): Gets or sets the name of the presentation theme.

Parameters

**value string required**

The value.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope ThemeNameForAllMasters(string name)` [#](#method-themenameforallmasters-string)

Sets the theme name across all masters.

Parameters

**name string required**

The value.

Returns

`PowerPointDocumentScope` The same scope.

VbaProject 3 overloads

`public PowerPointDocumentScope VbaProject(Stream project, long maximumBytes = 67108864)` [#](#method-vbaproject-io-stream-int64)

Adds or replaces the embedded VBA project from a complete, valid compound storage.

Parameters

**project System.IO.Stream required**

The value.

**maximumBytes long = 67108864 optional**

The value.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope VbaProject(byte[] project, long maximumBytes = 67108864)` [#](#method-vbaproject-byte-int64)

Adds or replaces the embedded VBA project from a complete, valid compound storage.

Parameters

**project byte[] required**

The value.

**maximumBytes long = 67108864 optional**

The value.

Returns

`PowerPointDocumentScope` The same scope.

`public PowerPointDocumentScope VbaProject(OfficeVbaProject project, OfficeVbaWriteOptions? options = null)` [#](#method-vbaproject-officeimo-officevbaproject-officeimo-officevbawriteoptions)

Applies a native source project, preserving non-signature child parts and requiring explicit signature removal.

Parameters

**project OfficeIMO.OfficeVbaProject required**

The value.

**options OfficeIMO.OfficeVbaWriteOptions? = null optional**

The value.

Returns

`PowerPointDocumentScope` The same scope.

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public PowerPointDocument Model { get; }` [#](#property-model)

The [PowerPointDocument](/api/powerpoint/officeimo-powerpoint-powerpointdocument/) this scope edits, for plain C# inside a lambda.

<!-- PowerForge markdown artifact sha256:2CF8A83F6EB641313FC0B13956E16B9F2BDBEE02DAAAE83ACF2AC7FFBC4FA10D -->
