![]() |
|
#6
|
|||
|
|||
|
This finds text between quotes and bolds the text leaving the quotes unbolded:
Code:
Sub SearchInQuotes() Dim bWC As Boolean Dim oRng As Word.Range Set oRng = ActiveDocument.Range With oRng.Find .MatchWildcards = True 'find curly '.Text = "^0147*^0148" 'Find straight '.Text = "^34*^34" 'Find both .Text = "[^34^0147]*[^34^0148]" While .Execute oRng.MoveStart wdCharacter, 1 oRng.MoveEnd wdCharacter, -1 oRng.Font.Bold = True oRng.Collapse wdCollapseEnd Wend End With End Sub |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Replace words within headers in multiple document
|
Carchee | Word VBA | 14 | 12-19-2013 04:36 PM |
Highlight and then replace multiple words
|
redhin | Word VBA | 5 | 03-05-2013 05:42 AM |
Macro to replace few words in the document
|
ubns | Word VBA | 7 | 08-16-2012 10:33 PM |
Find and Replace - symbols
|
clisco | Word | 5 | 01-03-2010 05:57 AM |