Hi,

How to finding a word in a text box using VBA? In recording a macro Word
found the word in the text box but running the macro Word does not find the
word.

Selection.Find.ClearFormatting
With Selection.Find
.Text = "test"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute

can anyone help me to achieve this.

regards

Re: Find by Helmut

Helmut
Mon Sep 27 12:38:06 CDT 2004

Hi,
see http://tinyurl.com/5yjul
as a start.
---
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98

Re: Find by Helmut

Helmut
Wed Sep 29 08:42:11 CDT 2004

Hi,
seems that "http://tinyurl.com/5yjul"
so that is what it should refer to:
...
a textbox is a storyrange other than the main story of
the document. Still worse, if you got more then one
textbox,
it comes to linked storyranges. See:
http://word.mvps.org/faqs/customization/ReplaceAnywhere.htm
Article contributed by Doug Robbins with enhancements by
Peter Hewett,
and ask again if you need further assistance.
---
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98