Hi 주 진규
Thank you for reaching out to Microsoft Q&A Forum and sharing your experience.
I understand you're building a PowerPoint Web Add-in with Office.js and need to insert a line with an arrowhead, but it's only appearing as a plain straight line.
The PowerPoint JavaScript API (Office.js) fully supports creating lines with arrowheads using ShapeCollection.addLine to add the line, followed by setting properties on the returned Shape.lineFormat object. These properties are part of the PowerPoint JavaScript API requirement set 1.4.
The properties you mentioned (endArrowheadStyle, endArrowheadLength, and endArrowheadWidth) are documented for consistency across Office hosts. Based on your scenario, however, these arrowhead features may not be fully supported in PowerPoint for the web at this time.
- If you're testing in PowerPoint Online and see rendering issues, try switching to the PowerPoint desktop client for development to check if it points to a web-specific issue.
- If arrowhead styling remains essential and doesn't render reliably, consider this workaround: Instead of using
addLine(), insert a built-in arrow shape viashapes.addGeometricShape(). Use a preset fromPowerPoint.GeometricShapeType(e.g., "rightArrow"), then customize it to mimic a thin line:
const arrowShape = shapes.addGeometricShape("RightArrow", {
left: 100,
top: 100,
width: 200,
height: 50
});
For your reference:
- Work with shapes using the PowerPoint JavaScript API - Office Add-ins | Microsoft Learn
- PowerPoint.ShapeCollection class - Office Add-ins | Microsoft Learn
- PowerPoint.GeometricShapeType enum - Office Add-ins | Microsoft Learn
I hope one of these steps gets you back up and running. Please let us know how you get on, as your feedback can help others in the community facing the same problem.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.