D
Dan
I made a word document that shows a custom form when it is opened. In that
form I add some data to fields (name, address...etc). Once I click the
submit button a function replaces some text fields on the document with my
user data.
ie. [First Name] gets replaced with Dan...etc
it works fine in the word document, but when I save the document as a
Template and try it doesnt replace the text. It shows the form, but when I
click submit it doesnt replace the text. Here is a part of the text replace
function. This is my first Word macro can someone give me a hand?\
With ThisDocument.Content.Find
.Text = "[First Name]"
.Replacement.Text = txtFirstName.Text
.Format = False
.MatchCase = True
.MatchWholeWord = True
.MatchSoundsLike = False
.Execute Replace:=wdReplaceAll
End With
form I add some data to fields (name, address...etc). Once I click the
submit button a function replaces some text fields on the document with my
user data.
ie. [First Name] gets replaced with Dan...etc
it works fine in the word document, but when I save the document as a
Template and try it doesnt replace the text. It shows the form, but when I
click submit it doesnt replace the text. Here is a part of the text replace
function. This is my first Word macro can someone give me a hand?\
With ThisDocument.Content.Find
.Text = "[First Name]"
.Replacement.Text = txtFirstName.Text
.Format = False
.MatchCase = True
.MatchWholeWord = True
.MatchSoundsLike = False
.Execute Replace:=wdReplaceAll
End With