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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top