Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting coordinates from a shape

Status
Not open for further replies.

NGordian

Programmer
Apr 25, 2005
10
0
0
DK
How do I get the x y coordinates from a shape??

 
I forgot to mention that I want to do this programmaticaly (using vb .net)
 
Here is a quick example of how to access each shape's properties on a page, using a commandbutton to trigger the list.
Code:
Private Sub CommandButton1_Click()
With ThisDocument.Pages("Page-1")
For Each x In .Shapes
MsgBox x.Name & "  x = " & x.Cells("pinx") & "  y = " & x.Cells("piny")
Next
End With
End Sub

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'If we're supposed to work in Hex, why have we only got A fingers?'
Essex Steam UK for steam enthusiasts
 
Thanks alot johnwm. That helped me a great deal.
 
You're welcome [smile]

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'If we're supposed to work in Hex, why have we only got A fingers?'
Essex Steam UK for steam enthusiasts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top