Page relative locations of shapes.

Joined
Nov 7, 2018
Messages
1
Reaction score
0
Hi,

I'm trying to work out the page relative locations of shapes on a page. I'm finding that if I do something like:

shape.select();
top = Globals.ThisAddIn.Application.Selection.Information[WdInformation.wdVerticalPositionRelativeToPage];
left = Globals.ThisAddIn.Application.Selection.Information[WdInformation.wdHorizontalPositionRelativeToPage];

then I'm getting the location of the associated anchor and not the shape itself.

Is this to be expected?

Many thanks

Martin
 

macropod

Microsoft MVP
Joined
Mar 2, 2012
Messages
580
Reaction score
50
Your code should be returning the top & left coordinates of the shape, not its anchor. Of course, it's entirely possible they have the same coordinates.
 
Top