PowerPoint.ShapeLineDashStyle enum
Specifies the dash style for a line.
Remarks
[ API set: PowerPointApi 1.4 ]
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/get-shapes-by-type.yaml
// Changes the dash style of every line in the slide.
await PowerPoint.run(async (context) => {
// Get the type of shape for every shape in the collection.
const shapes: PowerPoint.ShapeCollection = context.presentation.slides.getItemAt(0).shapes;
shapes.load("type");
await context.sync();
// Change the dash style for shapes of the type `line`.
shapes.items.forEach((shape) => {
if (shape.type === PowerPoint.ShapeType.line) {
shape.lineFormat.dashStyle = PowerPoint.ShapeLineDashStyle.dashDot;
}
});
await context.sync();
});
Fields
dash = "Dash" | The dash line pattern. |
dashDot = "DashDot" | The dash-dot line pattern. |
dashDotDot = "DashDotDot" | The dash-dot-dot line pattern. |
longDash = "LongDash" | The long dash line pattern. |
longDashDot = "LongDashDot" | The long dash-dot line pattern. |
longDashDotDot = "LongDashDotDot" | The long dash-dot-dot line pattern. |
roundDot = "RoundDot" | The round dot line pattern. |
solid = "Solid" | The solid line pattern. |
squareDot = "SquareDot" | The square dot line pattern. |
systemDash = "SystemDash" | The system dash line pattern. |
systemDashDot = "SystemDashDot" | The system dash-dot line pattern. |
systemDot = "SystemDot" | The system dot line pattern. |
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