Excel.ShapeAutoSize enum

Determines the type of automatic sizing allowed.

Remarks

[ API set: ExcelApi 1.9 ]

Examples

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/44-shape/shape-textboxes.yaml

await Excel.run(async (context) => {
    const shapes = context.workbook.worksheets.getItem("Shapes").shapes;
    const textbox = shapes.getItem("Textbox");
    textbox.textFrame.autoSizeSetting = Excel.ShapeAutoSize.autoSizeShapeToFitText;
    await 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.