PowerPoint.TextVerticalAlignment enum

Stellt die vertikale Ausrichtung eines PowerPoint.TextFrame in einer PowerPoint.Shape dar. Wenn eine der zentrierten Optionen ausgewählt ist, wird der Inhalt des TextFrame horizontal innerhalb der Shape als Gruppe zentriert. Informationen zum Ändern der horizontalen Ausrichtung eines Texts finden Sie unter PowerPoint.ParagraphFormat und PowerPoint.ParagraphHorizontalAlignment.

Hinweise

[ API-Satz: PowerPointApi 1.4 ]

Beispiele

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

// This function gets the collection of shapes on the first slide,
// and adds a brace pair, {}, to the collection, while specifying its
// location and size. Then it names the shape, sets its text and font
// color, and centers it inside the braces.
await PowerPoint.run(async (context) => {
  const shapes = context.presentation.slides.getItemAt(0).shapes;
  const braces = shapes.addGeometricShape(PowerPoint.GeometricShapeType.bracePair, {
      left: 100,
      top: 400,
      height: 50,
      width: 150
    });
  braces.name = "Braces";
  braces.textFrame.textRange.text = "Shape text";
  braces.textFrame.textRange.font.color = "purple";
  braces.textFrame.verticalAlignment = PowerPoint.TextVerticalAlignment.middleCentered;

  return context.sync();
});

Felder

bottom = "Bottom"

Gibt an, dass unten TextFrame am Shapeausgerichtet werden soll.

bottomCentered = "BottomCentered"

Gibt an, dass unten TextFrame vertikal am Shapeausgerichtet werden soll. Der Inhalt des TextFrame wird horizontal innerhalb des Shapezentriert.

middle = "Middle"

Gibt an, dass TextFrame zentriert am Shapeausgerichtet werden soll.

middleCentered = "MiddleCentered"

Gibt an, dass das TextFrame vertikal am Shapezentrierten ausgerichtet werden soll. Der Inhalt des TextFrame wird horizontal innerhalb des Shapezentriert.

top = "Top"

Gibt an, dass der TextFrame am oberen Rand Shapeausgerichtet werden soll.

topCentered = "TopCentered"

Gibt an, dass oben TextFrame vertikal am Shapeausgerichtet werden soll. Der Inhalt des TextFrame wird horizontal innerhalb des Shapezentriert.