I'm trying to create a VBA Macro in Word that will search for some text and apply a specific style to it. Before I automate it I'm trying to do it manually via the Find and Replace tool. Here's what I'm doing...
- Open a word document with the text: This is the first sentence in the word document.
- Make the phrase "in the" to be bold.
- Open up the Find and Replace Tool via Edit --> Replace.
- In the "Find what:" field only have Format: Font:Bold
- In the "Replace with:" field only have Format: Style:Heading 1
- Click on "Replace All"
Notice how the entire sentence has been changed to "Heading 1". I only wanted the areas in the document that were "bold" to be in "Heading 1" not the whole sentence.
What am I doing wrong?