Freigeben über


PowerPoint.ShapeType enum

Gibt den Typ einer Form an.

Hinweise

[ API-Satz: PowerPointApi 1.4 ]

Beispiele

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

Felder

geometricShape = "GeometricShape"

Die Form ist eine geometrische Form, z. B. ein Rechteck.

group = "Group"

Die Form ist eine Gruppenform, die Untergeordnete Shapes enthält.

image = "Image"

Die Form ist ein Bild

line = "Line"

Die Form ist eine Linie.

table = "Table"

Die Form ist eine Tabelle.

unsupported = "Unsupported"

Der Typ der angegebenen Form wird nicht unterstützt.