Reputation: 1003
I'm writing plugin for MS PowerPoint using C#. I need to get position each PPT shape in screen coordinates when presentation is running. How it can be obtained?
I have position of presentation viewer window and have shape position relative to top-left corner of the slide. But I haven't position of the slide relative to pesentation viewer.
Upvotes: 1
Views: 3893
Reputation: 3528
Each shape's .Top, .Left, .Height and .Width properties will tell you the position and size of the shape relative to the size of the PPT slide.
A few questions down there are some suggestions for getting the screen coordinates of the current slide show window.
In a dual-monitor system, finding out on which monitor a PowerPoint slideshow is displayed
Once you have both of those bits, the rest should be a simple ratio calculation.
Upvotes: 1