Word.ShapeTextOrientation enum
Gibt die Ausrichtung für den Textrahmen in einer Form an.
Hinweise
[ API-Satz: WordApiDesktop 1.2 ]
Beispiele
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/45-shapes/manage-shapes-text-boxes.yaml
await Word.run(async (context) => {
// Sets text frame properties of the first text box in the main document.
const shape: Word.Shape = context.document.body.shapes.getByTypes([Word.ShapeType.textBox]).getFirstOrNullObject();
shape.load("textFrame");
await context.sync();
if (shape.isNullObject) {
console.log("No shapes with text boxes found in the main document.");
return;
}
const textFrame: Word.TextFrame = shape.textFrame;
textFrame.verticalAlignment = Word.ShapeTextVerticalAlignment.bottom;
textFrame.orientation = Word.ShapeTextOrientation.vertical270;
textFrame.autoSizeSetting = Word.ShapeAutoSize.shapeToFitText;
console.log("The first text box's text frame properties were updated:", textFrame);
});
Felder
| eastAsianHorizontalRotated = "EastAsianHorizontalRotated" | Eine spezielle Version von vertikalem Text, bei der einige Schriftarten wie gedreht angezeigt werden. |
| eastAsianVertical = "EastAsianVertical" | Eine spezielle Version von vertikalem Text, bei der einige Schriftarten wie gedreht angezeigt werden. |
| horizontal = "Horizontal" | Horizontaler Text. |
| mixed = "Mixed" | Es wird eine Kombination aus automatischer Ausrichtung verwendet. |
| none = "None" | Keine Ausrichtung, z. B. in einer neuen geometrischen Form. |
| vertical = "Vertical" | Bestimmt, ob der gesamte Text vertikal ausgerichtet ist (jede Zeile wird um 90 Grad im Uhrzeigersinn gedreht). |
| vertical270 = "Vertical270" | Bestimmt, ob der gesamte Text vertikal ausgerichtet ist (jede Zeile ist um 270 Grad im Uhrzeigersinn gedreht). |