Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Word.ShapeTextWrapSide enum
- Package:
- word
Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farther from the respective page margin.
Remarks
Used by
Examples
// 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);
});
Fields
| both = "Both" | Both left and right sides of the shape. |
| largest = "Largest" | Side of the shape that's farther from the respective page margin. |
| left = "Left" | Left side of the shape only. |
| none = "None" | Has no wrap side property, such as those for inline shapes. |
| right = "Right" | Right side of the shape only. |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Add-ins
Feedback
Was this page helpful?
