Compartilhar via


Word.ShapeTextWrapType enum

Especifica como moldar texto do documento à volta de uma forma. Para obter mais detalhes, consulte o separador "Moldagem de Texto" das opções de Esquema.

Comentários

[ Conjunto de API: WordApiDesktop 1.2 ]

Exemplos

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

Campos

behind = "Behind"

Posiciona a forma atrás do texto.

front = "Front"

Posiciona a forma em frente ao texto.

inline = "Inline"

Places a forma em linha com o texto.

square = "Square"

Molda o texto ao redor da forma.

through = "Through"

Molda o texto ao redor e através da forma.

tight = "Tight"

Distribui o texto junto à forma.

topBottom = "TopBottom"

Posiciona o texto acima e abaixo da forma.