# PowerPointTemplateSlideRetention

Controls which source slides remain in a presentation created from a template.

Enum 

`OfficeIMO.PowerPoint`

**Namespace**

`OfficeIMO.PowerPoint`

**Assembly**

`OfficeIMO.PowerPoint`

**Source revision**

`07c6bff0a794` with working tree changes

**Source**

[PowerPointDocument.Templates.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/07c6bff0a79428344663938dd8a3f4e85ca513a2/OfficeIMO.PowerPoint/PowerPointDocument.Templates.cs#L7)

**Base**

`Enum`

**Implements**

`IComparable` `ISpanFormattable` `IFormattable` `IConvertible`

**Modifiers**

sealed

Controls which source slides remain in a presentation created from a template.

## Inheritance

- Enum
- PowerPointTemplateSlideRetention

## Guides & Samples

Authored walkthroughs and practical samples linked to this API.

- [Create PowerPoint Decks from Templates](/docs/powerpoint/templates/) Guide
  
  Inspect a corporate PPTX or POTX template, pick layouts and placeholders by name, create decks from it, and reuse its brand colors and fonts.

## Usage

Explore 4 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 4

- Property [PowerPointTemplateCreationOptions.SlideRetention](/api/powerpoint/officeimo-powerpoint-powerpointtemplatecreationoptions/#property-slideretention)
- Field [PowerPointTemplateSlideRetention.All](/api/powerpoint/officeimo-powerpoint-powerpointtemplateslideretention/#field-all)
- Field [PowerPointTemplateSlideRetention.None](/api/powerpoint/officeimo-powerpoint-powerpointtemplateslideretention/#field-none)
- Field [PowerPointTemplateSlideRetention.Selected](/api/powerpoint/officeimo-powerpoint-powerpointtemplateslideretention/#field-selected)

Filter members 

Show inherited

## Inherited Methods

`public int CompareTo(object? target)` [#](#method-compareto-object)

Inherited from Enum

Parameters

**target object? required**

Returns

`int`

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

Inherited from Enum

Parameters

**obj object? required**

Returns

`bool`

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

Inherited from Enum

Returns

`int`

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

Inherited from object

Returns

`Type`

`public TypeCode GetTypeCode()` [#](#method-gettypecode)

Inherited from Enum

Returns

`TypeCode`

`public bool HasFlag(Enum flag)` [#](#method-hasflag-enum)

Inherited from Enum

Parameters

**flag Enum required**

Returns

`bool`

ToString 4 overloads

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

Inherited from Enum

Returns

`string`

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

Inherited from Enum

Parameters

**format string? required**

Returns

`string`

`public string ToString(IFormatProvider? provider)` [#](#method-tostring-iformatprovider)

Inherited from Enum

`Obsolete("The provider argument is not used. Use ToString() instead.")`

Parameters

**provider IFormatProvider? required**

Returns

`string`

`public string ToString(string? format, IFormatProvider? provider)` [#](#method-tostring-string-iformatprovider)

Inherited from Enum

`Obsolete("The provider argument is not used. Use ToString(String) instead.")`

Parameters

**format string? required**

**provider IFormatProvider? required**

Returns

`string`

## Values

`public const PowerPointTemplateSlideRetention All` [#](#field-all)

[PowerPointDocument.Templates.cs:9](https://github.com/EvotecIT/OfficeIMO/blob/07c6bff0a79428344663938dd8a3f4e85ca513a2/OfficeIMO.PowerPoint/PowerPointDocument.Templates.cs#L9)

Keep every source slide.

Value: `0`

`public const PowerPointTemplateSlideRetention None` [#](#field-none)

[PowerPointDocument.Templates.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/07c6bff0a79428344663938dd8a3f4e85ca513a2/OfficeIMO.PowerPoint/PowerPointDocument.Templates.cs#L11)

Remove every source slide while preserving masters, layouts, theme, and assets.

Value: `1`

`public const PowerPointTemplateSlideRetention Selected` [#](#field-selected)

[PowerPointDocument.Templates.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/07c6bff0a79428344663938dd8a3f4e85ca513a2/OfficeIMO.PowerPoint/PowerPointDocument.Templates.cs#L13)

Keep only zero-based indexes listed in [PowerPointTemplateCreationOptions.SourceSlideIndexes](/api/powerpoint/officeimo-powerpoint-powerpointtemplatecreationoptions/).

Value: `2`

<!-- PowerForge markdown artifact sha256:145C9A699A2B142B1D125DC105F4C03F48AAF4AE71AF5DF761B7937BB009AFEA -->
