View Single Post
  #4   Report Post  
Greg Maxey
 
Posts: n/a
Default

Jim,

Select cat in the hat and run the following macro. You can cut or words to
alter as you like:

Sub TitleCaseWithLowerCase()

Application.ScreenUpdating = False

'Capitalize all words in selection
Selection.FormattedText.Case = wdTitleWord

'Uncapitalize the listed words
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting

Call DoTitleCase("The ")
Call DoTitleCase("Of ")
Call DoTitleCase("And ")
Call DoTitleCase("Or ")
Call DoTitleCase("But ")
Call DoTitleCase("A ")
Call DoTitleCase("An ")
Call DoTitleCase("To ")
Call DoTitleCase("In ")
Call DoTitleCase("With ")
Call DoTitleCase("From ")
Call DoTitleCase("By ")
Call DoTitleCase("Out ")
Call DoTitleCase("That ")
Call DoTitleCase("This ")
Call DoTitleCase("For ")
Call DoTitleCase("Against ")
Call DoTitleCase("About ")
Call DoTitleCase("Between ")
Call DoTitleCase("Under ")
Call DoTitleCase("On ")
Call DoTitleCase("Up ")
Call DoTitleCase("Into ")

'Uncomment the next line if you want the selection dismissed.
'Selection.Collapse wdCollapseStart

're-capitalize first word in title
Selection.Characters(1).Case = wdUpperCase

End Sub
Sub DoTitleCase(FindText As String)
'This procedure is called from TitleCaseWithLowerCase above

Dim r As Range
Set r = Selection.Range

With Selection.Find
..ClearFormatting
..Text = FindText
..Replacement.Text = "^&"
..Forward = True
..Wrap = wdFindStop
..MatchCase = True
..MatchWholeWord = True

Do While .Execute
Selection.FormattedText.Case = wdLowerCase
r.Select
Loop
End With
r.Select

End Sub

--
Greg Maxey/Word MVP
A Peer in Peer to Peer Support

Jim Henderson wrote:
Is there a way to tell word to uncapitalize the "small" words in a
title? The "Change Case/Title Case" function seems pretty useless to
me because it capitalizes every word in a title including "And",
"Or", "Of" when they are part of a Title. How can I get Word to
capitalize only the words that would appear capitalized in the normal
way a title is capitalized? Example: "the cat in the hat" becomes
"The Cat In The Hat" and then Word immediately flags the word "In" as
an error to be replaced with "in".

Jim Henderson

"Jay Freedman" wrote in message
...
On Wed, 2 Mar 2005 16:47:02 -0800, "amyallyaustin"
wrote:

how can i uncapitalize the first letter in a sentance


The easiest way is to select the capital letter and type the lower
case letter in its place.

If you want to prevent the automatic capitalization, go to Tools
AutoCorrect Options and uncheck "Capitalize first letter of
sentences". Or if you just want to reverse the autocorrect
occasionally, press Ctrl+Z or click Undo as soon as it happens. Or,
in later versions of Word, hover the mouse over the little blue box
under
the capital letter until it expands into an AutoCorrect Options
button, click it, and select the option you want.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org