Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

PowerPoint.SlideBackgroundPictureOrTextureFillOptions interface

Package:
powerpoint

Represents PowerPoint.SlideBackground picture or texture fill options.

Remarks

API set: PowerPointApi 1.10

Used by

Examples

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/slide-management/get-set-background-fill.yaml

// Sets the background of the first selected slide to a picture fill at 60% transparency.
// Uses a sample image from a Base64-encoded string.
await PowerPoint.run(async (context) => {
 const slide: PowerPoint.Slide = context.presentation.getSelectedSlides().getItemAt(0);
 slide.background.fill.setPictureOrTextureFill({
 imageBase64: getSampleImageAsBase64String(),
 transparency: 0.6,
 } as PowerPoint.SlideBackgroundPictureOrTextureFillOptions);
 await context.sync();

 console.log("Background set to picture fill (60% transparent).");
});

Properties

imageBase64

If provided, specifies the Base64-encoded image data for the fill.

transparency

If provided, specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear).

Property Details

imageBase64

If provided, specifies the Base64-encoded image data for the fill.

imageBase64?: string;

Property Value

string

Remarks

API set: PowerPointApi 1.10

transparency

If provided, specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear).

transparency: number;

Property Value

number

Remarks

API set: PowerPointApi 1.10


Feedback

Was this page helpful?