Word.ShapeTextWrapType enum

Especifica cómo encapsular el texto del documento alrededor de una forma. Para obtener más información, vea la pestaña "Ajuste de texto" de Opciones de diseño.

Comentarios

Conjunto de API: WordApiDesktop 1.2

Usada por

Ejemplos

// 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"

Coloca la forma detrás del texto.

front = "Front"

Coloca la forma delante del texto.

inline = "Inline"

Places la forma en línea con el texto.

square = "Square"

Ajusta el texto de forma cuadrada alrededor de la forma.

through = "Through"

Ajusta el texto alrededor y a través de la forma.

tight = "Tight"

El texto se ajusta muy próximo a la forma.

topBottom = "TopBottom"

Coloca el texto por encima y por debajo de la forma.