diff --git a/samples/powerpoint/shapes/get-shapes-by-type.yaml b/samples/powerpoint/shapes/get-shapes-by-type.yaml index 8e64c0ba..7eba070e 100644 --- a/samples/powerpoint/shapes/get-shapes-by-type.yaml +++ b/samples/powerpoint/shapes/get-shapes-by-type.yaml @@ -22,6 +22,7 @@ script: // Change the dash style for shapes of the type `line`. shapes.items.forEach((shape) => { if (shape.type === PowerPoint.ShapeType.line) { + shape.lineFormat.style = PowerPoint.ShapeLineStyle.thickThin; shape.lineFormat.dashStyle = PowerPoint.ShapeLineDashStyle.dashDot; } }); diff --git a/snippet-extractor-metadata/powerpoint.xlsx b/snippet-extractor-metadata/powerpoint.xlsx index d4a1aa15..a4f793ee 100644 Binary files a/snippet-extractor-metadata/powerpoint.xlsx and b/snippet-extractor-metadata/powerpoint.xlsx differ diff --git a/snippet-extractor-output/snippets.yaml b/snippet-extractor-output/snippets.yaml index c4136720..eba34b10 100644 --- a/snippet-extractor-output/snippets.yaml +++ b/snippet-extractor-output/snippets.yaml @@ -17679,6 +17679,7 @@ PowerPoint.ShapeLineDashStyle:enum: // Change the dash style for shapes of the type `line`. shapes.items.forEach((shape) => { if (shape.type === PowerPoint.ShapeType.line) { + shape.lineFormat.style = PowerPoint.ShapeLineStyle.thickThin; shape.lineFormat.dashStyle = PowerPoint.ShapeLineDashStyle.dashDot; } }); @@ -17701,6 +17702,7 @@ PowerPoint.ShapeLineFormat:class: // Change the dash style for shapes of the type `line`. shapes.items.forEach((shape) => { if (shape.type === PowerPoint.ShapeType.line) { + shape.lineFormat.style = PowerPoint.ShapeLineStyle.thickThin; shape.lineFormat.dashStyle = PowerPoint.ShapeLineDashStyle.dashDot; } }); @@ -17723,6 +17725,7 @@ PowerPoint.ShapeLineFormat#dashStyle:member: // Change the dash style for shapes of the type `line`. shapes.items.forEach((shape) => { if (shape.type === PowerPoint.ShapeType.line) { + shape.lineFormat.style = PowerPoint.ShapeLineStyle.thickThin; shape.lineFormat.dashStyle = PowerPoint.ShapeLineDashStyle.dashDot; } }); @@ -17790,6 +17793,7 @@ PowerPoint.ShapeType:enum: // Change the dash style for shapes of the type `line`. shapes.items.forEach((shape) => { if (shape.type === PowerPoint.ShapeType.line) { + shape.lineFormat.style = PowerPoint.ShapeLineStyle.thickThin; shape.lineFormat.dashStyle = PowerPoint.ShapeLineDashStyle.dashDot; } }); @@ -18155,6 +18159,29 @@ PowerPoint.SlideLayoutCollection#load:member(2): } } }); +PowerPoint.ShapeLineStyle:enum: + - >- + // 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.style = PowerPoint.ShapeLineStyle.thickThin; + shape.lineFormat.dashStyle = PowerPoint.ShapeLineDashStyle.dashDot; + } + }); + await context.sync(); + }); PowerPoint.SlideMaster:class: - >- // Link to full sample: