次の方法で共有


PowerPoint.ShapeType enum

図形の種類を指定します。

注釈

[ API セット: PowerPointApi 1.4 ]

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/get-shapes-by-type.yaml

// Changes the dash style of every line in the slide.
await PowerPoint.run(async (context) => {
  // Get the type of shape for every shape in the collection.
  const shapes = context.presentation.slides.getItemAt(0).shapes;
  shapes.load("type");
  await context.sync();

  // Change the dash style for shapes of the type `line`.
  shapes.items.forEach((shape) => {
    if (shape.type === PowerPoint.ShapeType.line) {
      shape.lineFormat.dashStyle = PowerPoint.ShapeLineDashStyle.dashDot;
    }
  });
  await context.sync();
});

フィールド

geometricShape = "GeometricShape"

図形は、四角形などの幾何学的図形です

group = "Group"

図形は、サブ図形を含むグループ図形です

image = "Image"

図形はイメージです

line = "Line"

図形は線です

table = "Table"

図形はテーブルです

unsupported = "Unsupported"

指定された図形の型はサポートされていません。