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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6. Drawing a rectangle in MS Word 2000???

Status
Not open for further replies.

ftpdoo

Programmer
Aug 9, 2001
202
GB


I'm trying to draw a box in MS Word from VB code... I've recorded a macro to do this and then pasted the code into VBA as follows:


ActiveDocument.Shapes.AddShape(msoShapeRectangle, 157.05, 27.2, 81#, _
27#).Select


But I keep getting the following error:

"The specified value is out of Range"????


Any Help would be great,
Thnx,

Jonathan
 
I've tryed this:

ActiveDocument.Shapes.AddShape msoShapeRectangle, 157.05, 27.2, 81, 27

and this:


.ActiveDocument.Shapes.AddShape msoShapeRectangle, 1,1,1,1

but i'm still getting the error.. "The Specified Value is out of Range"

Thnx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top