Word.ShapeTextWrapType enum
Spécifie comment habillage du texte d’un document autour d’une forme. Pour plus d’informations, consultez l’onglet « Habillage du texte » des options de disposition.
Remarques
[ Ensemble d’API : WordApiDesktop 1.2 ]
Exemples
// 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);
});
Champs
| behind = "Behind" | Place la forme derrière le texte. |
| front = "Front" | Place la forme devant le texte. |
| inline = "Inline" | Places la forme en ligne avec le texte. |
| square = "Square" | Encapsule le texte carrément autour de la forme. |
| through = "Through" | Encapsule le texte autour et à travers la forme. |
| tight = "Tight" | Place le texte près de la forme. |
| topBottom = "TopBottom" | Place le texte au-dessus et en dessous de la forme. |