question

Hosshan-1277 avatar image
0 Votes"
Hosshan-1277 asked emilyhua-msft edited

How to add straight line shape non width or height in PowerPoint .ShapeCollection Api

I'm using PowerPoint.ShapeCollection addLine function.
But I'm having trouble drawing parallel lines.

Because addLine's ShapeAddOptions width or height set 0 to recognized as having no value specified.

 const newShape1 = shapes.addLine(PowerPoint.ConnectorType.straight, {
             left: 100 + shapeWidth + lineWidth / 2,
             top: 100 + shapeHeight / 2,
             width: 1,
             height: 0,
           });

https://docs.microsoft.com/en-us/javascript/api/powerpoint/powerpoint.shapecollection?view=powerpoint-js-preview#powerpoint-powerpoint-shapecollection-addgeometricshape-member

office-js-devoffice-powerpoint-itpro
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@Hosshan-1277
As the tag "office-powerpoint-itpro" focuses more on general issue of PowerPiont, to help you better, I would add the related tag.
Thanks for your understandings.

0 Votes 0 ·

0 Answers