Macro in Word 2002

K

Kennedy223

Hi:
I am having trouble creating a macro that generates a text box in Word 2002.
I click on Tools to Macro and enter in a name, and assign a key stroke. In
Word while the Macro is recording, I cannot create a text box!

I click on create text box, and it gives me the standard icon for that
option, but when I try to draw one, it does not let me.

Could someone tell me what I am doing wrong!?
 
H

Herb Tyson [MVP]

I've no idea why it's not working in Word 2002, but I can affirm that it
works fine in Word 2003. Here's the macro I recorded to draw a textbox:

Sub DrawTextBox()
'
' DrawTextBox Macro
' Macro recorded 4/17/2008 by Herb
'
ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, 185.25, _
56.95, 167.55, 147.25).Select
Selection.ShapeRange.TextFrame.TextRange.Select
Selection.Collapse
End Sub

I can't necessarily fix your problem with Word 2002, but if this macro works
for you, then perhaps you can adjust the parameters to meet your needs.
 
K

Kennedy223

Thank you!!

Herb Tyson said:
I've no idea why it's not working in Word 2002, but I can affirm that it
works fine in Word 2003. Here's the macro I recorded to draw a textbox:

Sub DrawTextBox()
'
' DrawTextBox Macro
' Macro recorded 4/17/2008 by Herb
'
ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, 185.25, _
56.95, 167.55, 147.25).Select
Selection.ShapeRange.TextFrame.TextRange.Select
Selection.Collapse
End Sub

I can't necessarily fix your problem with Word 2002, but if this macro works
for you, then perhaps you can adjust the parameters to meet your needs.


--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com
 

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