PowerPoint.ShapeFontUnderlineStyle enum
The type of underline applied to a font.
Remarks
[ API set: PowerPointApi 1.4 ]
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
| dash = "Dash" | Underlining of text with a line containing dashes. |
| dashHeavy = "DashHeavy" | Underlining of text with a thick line containing dashes. |
| dashLong = "DashLong" | Underlining of text with a line containing long dashes. |
| dashLongHeavy = "DashLongHeavy" | Underlining of text with a thick line containing long dashes. |
| dotDash = "DotDash" | Underlining of text with a line containing dots and dashes. |
| dotDashHeavy = "DotDashHeavy" | Underlining of text with a thick line containing dots and dashes. |
| dotDotDash = "DotDotDash" | Underlining of text with a line containing double dots and dashes. |
| dotDotDashHeavy = "DotDotDashHeavy" | Underlining of text with a thick line containing double dots and dashes. |
| dotted = "Dotted" | Underlining of text with a dotted line. |
| dottedHeavy = "DottedHeavy" | Underlining of text with a thick, dotted line. |
| double = "Double" | Underlining of text with double lines. |
| heavy = "Heavy" | Underlining of text with a thick line. |
| none = "None" | No underlining. |
| single = "Single" | Regular single line underlining. |
| wavy = "Wavy" | Underlining of text with a wavy line. |
| wavyDouble = "WavyDouble" | Underlining of text with double wavy lines. |
| wavyHeavy = "WavyHeavy" | Underlining of text with a thick, wavy line. |