Problem using methods in c# powerpoint vsto add in

0

I have been trying to use the Shape.vertices property to get the coordinates of vertices of a shape but when i try to use this property following exception is thrown by VS2019.

System.Runtime.InteropServices.COMException

HResult=0x80004005

Message=Error HRESULT E_FAIL has been returned from a call to a COM component.

Source=DigitalDiagramEditor

StackTrace: 
at Microsoft.Office.Interop.PowerPoint.Shape.get_Vertices()

at DigitalDiagramEditor.ThisAddIn.Application_AfterShapeSizeChange(Shape shp) in D:\DigitalDrawing_VisualStudio\DigitalDiagramEditor\ThisAddIn.cs:line 77

Secondly I also tried using the SetPosition Method but in the case of a line shape, I am getting an out of range exception.

If you can resolve this problem or give me an example on how to use Shape.Vertices and ShapeNode.SetPosition properties in C#, it would be really helpful.

c#
vsto
asked on Stack Overflow Jul 10, 2019 by Sarthak Gupta • edited Jul 10, 2019 by Stephen Kennedy

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0