I have a word doc that contains word text boxes (different from say a VB text box)
When I use the Find and Replace function from Word itself (i.e. I have opened the .doc in word and pressed the find button) I can find the text in the text box.
When I try to find that same text from VB it does not find it.
ActiveDocument.Content.Select
With Selection.Find
.ClearFormatting
.Forward = True
.Execute FindText:=stringtofind, _
Replace:=wdReplaceAll, ReplaceWith:=replacementString
End With
This code will find string text in the body of the word document, but it will not find text within text boxes in the document.
Any ideas?
When I use the Find and Replace function from Word itself (i.e. I have opened the .doc in word and pressed the find button) I can find the text in the text box.
When I try to find that same text from VB it does not find it.
ActiveDocument.Content.Select
With Selection.Find
.ClearFormatting
.Forward = True
.Execute FindText:=stringtofind, _
Replace:=wdReplaceAll, ReplaceWith:=replacementString
End With
This code will find string text in the body of the word document, but it will not find text within text boxes in the document.
Any ideas?