Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word and VBA - selecting & formatting a word throughout doc 1

Status
Not open for further replies.

hoggbottom59

Technical User
Jul 30, 2001
68
GB
I wish to use VBA to write a macro to select a user input word and then change the font format just for that word throughout the document.

I haven't found a way of only selecting the word and nothing else.

Any help is most welcome.

Leon.
 

You might have to tweak this a bitm but here's the general idea

Set myRange = ActiveDocument.Range(Start:=0, End:=Selection.End)
For Each aWord In myRange.Words
If aWord.Text = "Franklin " Then aWord.Font.Bold = True
Next aWord
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top