thanks, but that doesn't really work. Problem is that by clearing the format
thru ctrl+q and ctrl+space, you also delete the boldtext style so that the
second find and replace doesn't work anymore. But thanks for taking the time
to respond to my question!
> 1. Define a character style called maybe "BoldText". The actual style
> features are irrelevant -- it's only the name you need. Not that it must be
[quoted text clipped - 14 lines]
> > hello, I'm looking for a way to remove all font formatting from a Word
> > document except the bold. Appreciate any suggestions. Thanks, Michiel
Hi Michiel,
Two snags:
-- Bold may be applied by styles.
-- If you have a bold style and something in that has been unbolded, you
likely don't want to loose that either?
You could
-- tag bold text first (Find/Replace "Font = bold" with <b>^&</b>),
(both bold from styles and manual bolding will be tagged)
-- reset the font,
-- remove all bold formatting (say by replacing "bold" with "not bold"),
-- then replace (using "Match wildcards"):
Find what: \<b\>(*)\</b\>
Replace with: \1 ((+ Format > Font = bold))
-- Finally save the doc before you work further on it. You'll have applied
manual bold formatting to all bold styles (headings?...).
A Save will enable Word to clean that unnecessary formatting up.
Greetings,
Klaus
> thanks, but that doesn't really work. Problem is that by clearing the
> format
[quoted text clipped - 23 lines]
>> > hello, I'm looking for a way to remove all font formatting from a Word
>> > document except the bold. Appreciate any suggestions. Thanks, Michiel
Helmut Weber - 25 Mar 2006 15:42 GMT
Hi Klaus,
how about this one,
coded with respect to speed
and with respect to avoiding repagination by inserting tags,
at least to some extend.
I think in principle it could be used in quite a variety of cases:
Sub test000()
Dim oPrg As Paragraph
Dim rWrd As Range
Dim rChr As Range
For Each oPrg In ActiveDocument.Paragraphs
If oPrg.Range.Font.Bold = False Then
oPrg.Range.Font.Reset
ElseIf oPrg.Range.Font.Bold = True Then
oPrg.Range.Font.Reset
oPrg.Range.Font.Bold = True
ElseIf oPrg.Range.Font.Bold = 9999999 Then
For Each rWrd In oPrg.Range.Words
If rWrd.Font.Bold = False Then
rWrd.Font.Reset
ElseIf rWrd.Font.Bold = True Then
rWrd.Font.Reset
rWrd.Font.Bold = True
ElseIf rWrd.Font.Bold = 9999999 Then
For Each rChr In rWrd.Characters
If rChr.Font.Bold = True Then
rChr.Font.Reset
rChr.Font.Bold = True
ElseIf rChr.Font.Bold = False Then
rChr.Font.Reset
End If
Next
End If
Next
End If
Next
End Sub
I am not sure, whether formatting something as bold,
which is bold anyway, may cause problems sometime.

Signature
Gruß aus Landsberg am Lech
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Klaus Linke - 25 Mar 2006 21:06 GMT
Hi Helmut,
Interesting approach, looks well optimized! Though 3 replacements and
"FontReset" on the whole doc is likely pretty fast, too...
Not sure what program would "win".
It might depend on the specifics of the document (how large? how much bold
text? ...).
Regards,
Klaus
> Hi Klaus,
>
[quoted text clipped - 39 lines]
> I am not sure, whether formatting something as bold,
> which is bold anyway, may cause problems sometime.
michiel - 26 Mar 2006 23:51 GMT
> Hi Klaus,
>
[quoted text clipped - 39 lines]
> I am not sure, whether formatting something as bold,
> which is bold anyway, may cause problems sometime.
michiel - 26 Mar 2006 23:50 GMT
> Hi Michiel,
>
[quoted text clipped - 46 lines]
> >> > hello, I'm looking for a way to remove all font formatting from a Word
> >> > document except the bold. Appreciate any suggestions. Thanks, Michiel