So why did you go to the trouble of writing a macro to do something
they didn't ask for a macro to do?
Did you read the first sentence of my reply?
Peter T. Daniels wrote:
That's not what he/she says they want -- they want the first letter
of the word _after_ the colon to be capitalized automatically!
(Like that "feature" that automatically capitalizes the first word
of a "sentence.")
On Nov 25, 2:00 am, "Graham Mayor" <
[email protected]>
wrote:
You cannot do this automatically - apart from pressing the Shift
key as
required - but you can run a macro to reformat the text in your
document
that matches your layout eg
Sub FormatAfterColon()
Dim sFindText
Dim oRng As Range
sFindText = "[A-Z]: [a-z]"
Set oRng = ActiveDocument.Range
With oRng.Find
.Text = sFindText
Do While .Execute(Forward:=True, _
MatchWildcards:=True) = True
oRng.Case = wdUpperCase
oRng.Collapse wdCollapseEnd
Loop
End With
End Sub
This will format any upper case letter (your heading) followed
immediately
by a colon two spaces and a lower case letter (your
paragraph)
http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web sitewww.gmayor.com
Word MVP web sitehttp://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
purromaniac wrote:
I do medical transcription, and my reports have to follow this
format:
HEADING: Paragraph.
HEADING: Paragraph.
How can I get Word to auto capitalize the first word in the
sentence following the colon? Another transcriptionist asked this
question in 2006 and was told it is not possible. Does anyone
know if upgrading to Word 2007 would make a difference?----