User forms, Word 2000, macro error

D

dmk

I am experimenting with "creating a template that contains an autonew macro
which will cause a Userform to be displayed, into which you can enter some
information that you want to appear in the document."

This is the code provided by a MVP in the newsgroup:
Private Sub CommandButton1_Click()
With ActiveDocument
.Bookmarks("Text1").Range_
.InsertBefore TextBox1
.Bookmarks("Text2").Range_
.InsertBefore TextBox2
End With
UserForm1.Hide

End Sub

Okay, I cannot compile the template because I get an error: "Method or data
member not found" and "Range_" is highlighted in the code. What do I need to
do to fix it? Thanks.
 

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