Word.Alignment enum

Comentarios

[ Conjunto de API: WordApi 1.1 ]

Ejemplos

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/paragraph-properties.yaml

await Word.run(async (context) => {
  const body = context.document.body;
  body.clear();
  body.insertParagraph(
    "Video provides a powerful way to help you prove your point. When you click Online Video, you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document.",
    "Start"
  );
  body.paragraphs
    .getLast()
    .insertText(
      "To make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other. For example, you can add a matching cover page, header, and sidebar. Click Insert and then choose the elements you want from the different galleries.",
      "Replace"
    );
  body.paragraphs.getFirst().alignment = "Left";
  body.paragraphs.getLast().alignment = Word.Alignment.left;
});

Campos

centered = "Centered"

Alineación con el centro.

justified = "Justified"

Alineación totalmente justificada.

left = "Left"

Alineación a la izquierda.

mixed = "Mixed"
right = "Right"

Alineación a la derecha.

unknown = "Unknown"

Alineación desconocida.