Window.GetPoint procedure builder

Window.GetPoint (Word)

Returns the screen coordinates of the specified range or shape.

If the entire range or shape isn't visible on the screen, an error occurs.

GetPoint (ScreenPixelsLeft, ScreenPixelsTop, ScreenPixelsWidth, ScreenPixelsHeight, obj)

Dim pLeft As Long 
Dim pTop As Long 
Dim pWidth As Long 
Dim pHeight As Long 
 
ActiveWindow.GetPoint pLeft, pTop, pWidth, pHeight, _ 
 Selection.Range 
MsgBox "Left = " & pLeft & vbLf _ 
 & "Top = " & pTop & vbLf _ 
 & "Width = " & pWidth & vbLf _ 
 & "Height = " & pHeight

Arguments

The following arguments are required:

ScreenPixelsLeft (Long) - The variable name to which you want Microsoft Word to return the value for the left edge of the object.

ScreenPixelsTop (Long) - The variable name to which you want Word to return the value for the top edge of the object.

ScreenPixelsWidth (Long) - The variable name to which you want Word to return the value for the width of the object.

ScreenPixelsHeight (Long) - The variable name to which you want Word to return the value for the height of the object.

obj (Shape) - A Range or Shape object.