After upgrading to Office 2010, I tried to record a macro like one I’d used in Word 2007:
1) In an open document, click on “Developer” tab, click on Record Macro, name it “InsertTextBox” and give short description, and click “OK” (“Store…” shows “Normal.dotm”.)
2) Click on “Insert” tab, then on “Text Box” then on “Simple Text Box”
3) Type “This is the text”
3) Press “Escape” twice to regain regular cursor
4) Click on “Developer” tab, then on “Stop Recording”
When I try to run the macro, I get a Microsoft Visual Basic error window, saying:
====================================
Run-Time Error
‘-2147024809(80070057)’
The item with the specified name wasn’t found.
=====================================
If I click on “Debug”, I see:
=====================================
Sub InsertTextBox()
‘
‘ InsertTextBox Macro
‘ InsertsTextBox
‘
ActiveDocument.Shapes.Range(Array(“Text Box 2”)).Select
Application.Templates( _
“C:UsersDaveAppDataRoamingMicrosoftDocument Building Blocks103314Built-In Building Blocks.dotx” _
).BuildingBlockEntries(” Simple Text Box”).Insert Where:=Selection.Range, _
RichText:=True
Selection.TypeText Text:=”This is the text”
Selection.EscapeKey
Selection.Collapse
End Sub
=========================================
Highlighted in yellow is the line “ActiveDocument …. Select”
I’ve tried this several times, with the same result, regardless of whether I choose to insert “simple text box” or any of the others, or “draw text box” and create my own.
Any ideas of what I’m doing wrong or why it doesn’t work… since it did in Word 2007…?
Many thanks.
Dave