Freigeben über


Word.ShapeTextWrapType enum

Gibt an, wie Dokumenttext um eine Form umbrochen werden soll. Weitere Informationen finden Sie auf der Registerkarte "Textumbruch" der Layoutoptionen.

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 wrap properties of the first text box.
  const firstShapeWithTextBox: Word.Shape = context.document.body.shapes
    .getByTypes([Word.ShapeType.textBox])
    .getFirstOrNullObject();
  firstShapeWithTextBox.load("textWrap");
  await context.sync();

  if (firstShapeWithTextBox.isNullObject) {
    console.log("No shapes with text boxes found in main document.");
    return;
  }

  const textWrap: Word.ShapeTextWrap = firstShapeWithTextBox.textWrap;
  textWrap.type = Word.ShapeTextWrapType.square;
  textWrap.side = Word.ShapeTextWrapSide.both;

  console.log("The first text box's text wrap properties were updated:", textWrap);
});

Felder

behind = "Behind"

Platziert die Form hinter den Text.

front = "Front"

Platziert die Form vor dem Text.

inline = "Inline"

Places die Form in Zeile mit Text.

square = "Square"

Umschließt Text quadratisch um die Form.

through = "Through"

Umschließt Text um und durch die Form.

tight = "Tight"

Lässt Text eng um die Form herumfließen.

topBottom = "TopBottom"

Platziert Text ober- und unterhalb der Form.