Replace fonts between quotes from regular text to bold?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How may I automatically replace all words between double quotes from regular
text to bold text (i.e., "all words in regular text" to "all words in bold
text")?

Thank you,
Marilyn
 
Are they "straight" quotes, or are they “directional” quotes?

If they are straight quotes, one method I can think of would require two
steps (unless you want the quote marks to also be bold):

1. Set Find:"*" Enable Use Wildcard. Press Ctrl+B twice so that Not Bold
is set as the Find formatting. Click in the Replace field, and press Ctrl+B
once so that Bold is set at the replace formatting; make sure that the
Replace field is empty. Click Replace All.

2. To unbold the quotes, Set Find:" only, set the formatting to Bold; clear
the Use Wildcards option, and set the formatting of the [still empty]
Replace field to Not Bold. Click Replace All.

Obviously, if you otherwise have any quotes that you want kept bold, step 2
isn't what you want.

If they are directional quotes that you have, you should type “*” into your
document, copy it to the clipboard, then paste it into the Find field,
rather than using "*".
 
Hi Marilyn,

want a macro?

Try:

Sub BoldBetweenDirectionalDoubleQuotes()
Dim rDcm As Range
Set rDcm = ActiveDocument.Range
With rDcm.Find
.Text = Chr(147) & "*" & Chr(148)
.MatchWildcards = True
While .Execute
'rDcm.Select ' for testing only
rDcm.Start = rDcm.Start + 1
rDcm.End = rDcm.End - 1
rDcm.Font.Bold = True
rDcm.Start = rDcm.End + 1
rDcm.End = ActiveDocument.Range.End
Wend
End With
End Sub

Might be way too much for someone
who's never seen anything like that.

But you'll never know.

Otherwise, follow Herb's instructions.


--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 
Back
Top