Word vba issue

T

tope12

I made two textboxes in a Microsoft Word document. They're called text2 and
text3. When I click on text3. I wanted a word to appear in text 3 if text2
contained a certain string, but it doesn't work.

Private Sub text3_click()
If text2 = "john" Then
text3 = "Doe"
End If
End Sub
 
M

macropod

Hi tope12,

Try:
ActiveDocument.Bookmarks("Text3").Range.Fields(1).Result.Text = "Doe"

Cheers
 
Top