find selected text

  • Thread starter Thread starter n6trf
  • Start date Start date
N

n6trf

Trying to create a macro that will find the selected text. So how do I
select text & then run a macro that will find the next 'selected' text? TIA
 
I know how to edit save ... . What I need is what do I use in place of .text
"something" where something is the selected word ... in the document.
 
Read a lot of what i already knew & did a search for my specific problem but
no banana :-(.
 
You can record a macro that uses the find/replace function, but what do you
want to do with the text that you have found.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Use selection()

For example:

With Selection.Find
.Text = Selection()
End With
Selection.Find.Execute
 
Yes I know about recording a macro. When I'm planning on doing is seeing if
there are two occasions of that selected text in the document and then
selecting another text and repeat that etc.
 
Ok that's what I was looking for. Seems like there should be a reference
manual or tutorial manual for vba in word someplace.
 
Back
Top