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.
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.