This page contains a macro that converts any paragraph formatted as Upper
case to be formatted as Heading1 style. In order to make that paragraph
sentence case also - you need an extra line of code
Selection.Range.Case = wdTitleSentence
so the revised macro would be as follows.
I guess also that you don't know what to do with macro listings, so you
should find the tutorial at
http://www.gmayor.com/installing_macro.htm
helpful.
Sub FindAllCaps()
'start at beginning of doc
Selection.HomeKey wdStory
'get rid of any previous format criteria in the find dialog
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
'search for any paragraph that has no lowercase letters
'WARNING: If you need to exclude paragraphs with numerals,
'change the .Text argument to [!^013a-z0-9]@^013
With Selection.Find
.Text = "[!^013a-z]@^013"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = True
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Do While Selection.Find.Execute()
'change the style only if the found text
'represents the entire paragraph
If Selection.Start = Selection.Paragraphs.First.Range.Start Then
Selection.Style = wdStyleHeading1
'now change to sentence case
Selection.Range.Case = wdTitleSentence
End If
'position the cursor after the found text
'in preparation for finding the next occurrence
Selection.Collapse wdCollapseEnd
Loop
End Sub
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><
Graham Mayor - Word MVP
My web site
www.gmayor.com
Word MVP web site
www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>><