I'm trying to create a userform in Word with VBA. I found this example on the net:
Private Sub CommandButton1_Click()
With ActiveDocument
.Bookmarks("Vornaam"
.Range_
.InsertBefore TextBox1
.Bookmarks("Achternaam"
.Range_
.InsertBefore TextBox2
End With
UserForm1.Hide
End Sub
Somehow VBA is not recognizing the range. I want the form to fill in the text from the userform throughout the entire document wherever it finds the bookmarks.
Please advice.
Thanks
Private Sub CommandButton1_Click()
With ActiveDocument
.Bookmarks("Vornaam"
.InsertBefore TextBox1
.Bookmarks("Achternaam"
.InsertBefore TextBox2
End With
UserForm1.Hide
End Sub
Somehow VBA is not recognizing the range. I want the form to fill in the text from the userform throughout the entire document wherever it finds the bookmarks.
Please advice.
Thanks