Partager via


PowerPoint.ShapeType enum

Spécifie le type d’une forme.

Remarques

[ Ensemble d’API : PowerPointApi 1.4 ]

Exemples

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

Champs

geometricShape = "GeometricShape"

La forme est une forme géométrique telle que le rectangle

group = "Group"

La forme est une forme de groupe qui contient des sous-formes

image = "Image"

La forme est une image

line = "Line"

La forme est une ligne

table = "Table"

La forme est un tableau

unsupported = "Unsupported"

Le type de la forme donnée n’est pas pris en charge.