Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
PowerPoint.ShapeAutoSize enum
- Package:
- powerpoint
Determines the type of automatic sizing allowed.
Remarks
Used by
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/shapes.yaml
// This function gets the collection of shapes on the first slide,
// and adds a brace pair, {}, to the collection, while specifying its
// location and size. Then it names the shape, sets its text and font
// color, and centers it inside the braces.
await PowerPoint.run(async (context) => {
const shapes: PowerPoint.ShapeCollection = context.presentation.slides.getItemAt(0).shapes;
const braces: PowerPoint.Shape = shapes.addGeometricShape(PowerPoint.GeometricShapeType.bracePair, {
left: 100,
top: 400,
height: 50,
width: 150,
});
braces.name = "Braces";
braces.textFrame.textRange.text = "Shape text";
braces.textFrame.textRange.font.color = "purple";
braces.textFrame.textRange.font.underline = PowerPoint.ShapeFontUnderlineStyle.heavy;
braces.textFrame.verticalAlignment = PowerPoint.TextVerticalAlignment.middleCentered;
braces.textFrame.autoSizeSetting = PowerPoint.ShapeAutoSize.autoSizeShapeToFitText;
return context.sync();
});
Fields
| autoSizeMixed = "AutoSizeMixed" | A combination of automatic sizing schemes are used. |
| autoSizeNone = "AutoSizeNone" | No autosizing. |
| autoSizeShapeToFitText = "AutoSizeShapeToFitText" | The shape is adjusted to fit the text. |
| autoSizeTextToFitShape = "AutoSizeTextToFitShape" | The text is adjusted to fit the shape. |
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?
