PowerPoint.SlideBackgroundFill class

Represents the fill formatting of a slide background object.

Extends

Remarks

[ API set: PowerPointApi 1.10 ]

Properties

context

The request context associated with the object. This connects the add-in's process to the Office host application's process.

type

Returns the fill type of the slide background. See PowerPoint.SlideBackgroundFillType for details.

Methods

getGradientFillOrNullObject()

Gets the gradient fill properties. If the fill type is not gradient, an object with an isNullObject property set to true is returned. For further information, see *OrNullObject methods and properties.

getPatternFillOrNullObject()

Gets the pattern fill properties. If the fill type is not pattern, an object with an isNullObject property set to true is returned. For further information, see *OrNullObject methods and properties.

getPictureOrTextureFillOrNullObject()

Gets the picture or texture fill properties. If the fill type is not pictureOrTexture, an object with an isNullObject property set to true is returned. For further information, see *OrNullObject methods and properties.

getSolidFillOrNullObject()

Gets the solid fill properties. If the fill type is not solid, an object with an isNullObject property set to true is returned. For further information, see *OrNullObject methods and properties.

load(options)

Queues up a command to load the specified properties of the object. You must call context.sync() before reading the properties.

load(propertyNames)

Queues up a command to load the specified properties of the object. You must call context.sync() before reading the properties.

load(propertyNamesAndPaths)

Queues up a command to load the specified properties of the object. You must call context.sync() before reading the properties.

setGradientFill(options)

Sets the fill formatting of the slide background to a gradient fill. This changes the fill type to gradient.

setPatternFill(options)

Sets the fill formatting of the slide background to a pattern fill. This changes the fill type to pattern.

setPictureOrTextureFill(options)

Sets the fill formatting of the slide background to a picture or texture fill. This changes the fill type to pictureOrTexture.

setSolidFill(options)

Sets the fill formatting of the slide background to a solid fill. This changes the fill type to solid.

toJSON()

Overrides the JavaScript toJSON() method in order to provide more useful output when an API object is passed to JSON.stringify(). (JSON.stringify, in turn, calls the toJSON method of the object that's passed to it.) Whereas the original PowerPoint.SlideBackgroundFill object is an API object, the toJSON method returns a plain JavaScript object (typed as PowerPoint.Interfaces.SlideBackgroundFillData) that contains shallow copies of any loaded child properties from the original object.

Property Details

context

The request context associated with the object. This connects the add-in's process to the Office host application's process.

context: RequestContext;

Property Value

type

Returns the fill type of the slide background. See PowerPoint.SlideBackgroundFillType for details.

readonly type: PowerPoint.SlideBackgroundFillType | "Unsupported" | "Solid" | "Gradient" | "PictureOrTexture" | "Pattern";

Property Value

PowerPoint.SlideBackgroundFillType | "Unsupported" | "Solid" | "Gradient" | "PictureOrTexture" | "Pattern"

Remarks

[ API set: PowerPointApi 1.10 ]

Method Details

getGradientFillOrNullObject()

Gets the gradient fill properties. If the fill type is not gradient, an object with an isNullObject property set to true is returned. For further information, see *OrNullObject methods and properties.

getGradientFillOrNullObject(): PowerPoint.SlideBackgroundGradientFill;

Returns

Remarks

[ API set: PowerPointApi 1.10 ]

getPatternFillOrNullObject()

Gets the pattern fill properties. If the fill type is not pattern, an object with an isNullObject property set to true is returned. For further information, see *OrNullObject methods and properties.

getPatternFillOrNullObject(): PowerPoint.SlideBackgroundPatternFill;

Returns

Remarks

[ API set: PowerPointApi 1.10 ]

getPictureOrTextureFillOrNullObject()

Gets the picture or texture fill properties. If the fill type is not pictureOrTexture, an object with an isNullObject property set to true is returned. For further information, see *OrNullObject methods and properties.

getPictureOrTextureFillOrNullObject(): PowerPoint.SlideBackgroundPictureOrTextureFill;

Returns

Remarks

[ API set: PowerPointApi 1.10 ]

getSolidFillOrNullObject()

Gets the solid fill properties. If the fill type is not solid, an object with an isNullObject property set to true is returned. For further information, see *OrNullObject methods and properties.

getSolidFillOrNullObject(): PowerPoint.SlideBackgroundSolidFill;

Returns

Remarks

[ API set: PowerPointApi 1.10 ]

load(options)

Queues up a command to load the specified properties of the object. You must call context.sync() before reading the properties.

load(options?: PowerPoint.Interfaces.SlideBackgroundFillLoadOptions): PowerPoint.SlideBackgroundFill;

Parameters

options
PowerPoint.Interfaces.SlideBackgroundFillLoadOptions

Provides options for which properties of the object to load.

Returns

load(propertyNames)

Queues up a command to load the specified properties of the object. You must call context.sync() before reading the properties.

load(propertyNames?: string | string[]): PowerPoint.SlideBackgroundFill;

Parameters

propertyNames

string | string[]

A comma-delimited string or an array of strings that specify the properties to load.

Returns

load(propertyNamesAndPaths)

Queues up a command to load the specified properties of the object. You must call context.sync() before reading the properties.

load(propertyNamesAndPaths?: {
            select?: string;
            expand?: string;
        }): PowerPoint.SlideBackgroundFill;

Parameters

propertyNamesAndPaths

{ select?: string; expand?: string; }

propertyNamesAndPaths.select is a comma-delimited string that specifies the properties to load, and propertyNamesAndPaths.expand is a comma-delimited string that specifies the navigation properties to load.

Returns

setGradientFill(options)

Sets the fill formatting of the slide background to a gradient fill. This changes the fill type to gradient.

setGradientFill(options?: PowerPoint.SlideBackgroundGradientFillOptions): void;

Parameters

options
PowerPoint.SlideBackgroundGradientFillOptions

Options for the gradient fill.

Returns

void

Remarks

[ API set: PowerPointApi 1.10 ]

setPatternFill(options)

Sets the fill formatting of the slide background to a pattern fill. This changes the fill type to pattern.

setPatternFill(options?: PowerPoint.SlideBackgroundPatternFillOptions): void;

Parameters

options
PowerPoint.SlideBackgroundPatternFillOptions

Options for the pattern fill.

Returns

void

Remarks

[ API set: PowerPointApi 1.10 ]

setPictureOrTextureFill(options)

Sets the fill formatting of the slide background to a picture or texture fill. This changes the fill type to pictureOrTexture.

setPictureOrTextureFill(options?: PowerPoint.SlideBackgroundPictureOrTextureFillOptions): void;

Parameters

options
PowerPoint.SlideBackgroundPictureOrTextureFillOptions

Options for the picture or texture fill.

Returns

void

Remarks

[ API set: PowerPointApi 1.10 ]

setSolidFill(options)

Sets the fill formatting of the slide background to a solid fill. This changes the fill type to solid.

setSolidFill(options?: PowerPoint.SlideBackgroundSolidFillOptions): void;

Parameters

options
PowerPoint.SlideBackgroundSolidFillOptions

Options for the solid fill.

Returns

void

Remarks

[ API set: PowerPointApi 1.10 ]

toJSON()

Overrides the JavaScript toJSON() method in order to provide more useful output when an API object is passed to JSON.stringify(). (JSON.stringify, in turn, calls the toJSON method of the object that's passed to it.) Whereas the original PowerPoint.SlideBackgroundFill object is an API object, the toJSON method returns a plain JavaScript object (typed as PowerPoint.Interfaces.SlideBackgroundFillData) that contains shallow copies of any loaded child properties from the original object.

toJSON(): PowerPoint.Interfaces.SlideBackgroundFillData;

Returns