Compartir a través de


PowerPoint.ShapeType enum

Especifica el tipo de una forma.

Comentarios

[ Conjunto de API: PowerPointApi 1.4 ]

Ejemplos

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

Campos

geometricShape = "GeometricShape"

La forma es una forma geométrica como rectángulo.

group = "Group"

La forma es una forma de grupo que contiene subformas.

image = "Image"

La forma es una imagen

line = "Line"

La forma es una línea

table = "Table"

La forma es una tabla

unsupported = "Unsupported"

No se admite el tipo de forma determinada.