find selected text

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
 
N

n6trf

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.
 
N

n6trf

Read a lot of what i already knew & did a search for my specific problem but
no banana :-(.
 
G

Graham Mayor

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

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
H

Herb Tyson [MVP]

Use selection()

For example:

With Selection.Find
.Text = Selection()
End With
Selection.Find.Execute
 
N

n6trf

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.
 
N

n6trf

Ok that's what I was looking for. Seems like there should be a reference
manual or tutorial manual for vba in word someplace.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top