Edit

Share via


PowerPoint.SlideBackgroundFillType enum

Specifies the fill type for a PowerPoint.SlideBackground.

Remarks

[ API set: PowerPointApi 1.10 ]

Examples

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

// Gets the background fill type of the first selected slide.
await PowerPoint.run(async (context) => {
  const slide: PowerPoint.Slide = context.presentation.getSelectedSlides().getItemAt(0);
  const fill: PowerPoint.SlideBackgroundFill = slide.background.fill;
  fill.load("type");
  await context.sync();

  const fillType = fill.type as PowerPoint.SlideBackgroundFillType;
  console.log(`Background fill type: ${fillType}`);
});

Fields

gradient = "Gradient"

Specifies that the slide background should have gradient fill.

pattern = "Pattern"

Specifies that the slide background should have pattern fill.

pictureOrTexture = "PictureOrTexture"

Specifies that the slide background should have picture or texture fill.

solid = "Solid"

Specifies that the slide background should have regular solid fill.

unsupported = "Unsupported"

Unsupported slide background fill.