次の方法で共有


PowerPoint.SlideBackgroundFillType enum

PowerPoint.SlideBackground の塗りつぶしの種類を指定します。

注釈

[ API set: PowerPointApi 1.10 ]

// 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}`);
});

フィールド

gradient = "Gradient"

スライドの背景にグラデーションの塗りつぶしを指定します。

pattern = "Pattern"

スライドの背景にパターンの塗りつぶしを指定します。

pictureOrTexture = "PictureOrTexture"

スライドの背景に図またはテクスチャの塗りつぶしを指定します。

solid = "Solid"

スライドの背景に標準の塗りつぶしを設定します。

unsupported = "Unsupported"

サポートされていないスライドの背景の塗りつぶし。