![]() |
#1
|
|||
|
|||
![]()
i have a script given to me.
all the dialog was in all caps. i used shift f3 to change it to lower case and then shift f3 again to change it to capitalize the first letter of every sentence.... problem is all the dialog is in this format Dick: your name, boy? Ainsworth: ainsworth, sir… as you can see it doesn't recognize the ": " before the sentence as the start of a sentence, so there for it doesn't capitalize. is there a way to capitalize ever letter that follows a colon space ": " thanks in advance for any help.... |
#2
|
||||
|
||||
![]()
Hi angeltread,
Try the following macro: Code:
Sub Capitalize() Application.ScreenUpdating = False Dim oRng As Range, fRng As Range With Selection Set oRng = .Range With .Find .ClearFormatting .MatchWildcards = True .Wrap = wdFindContinue .Forward = True .Text = ": [a-z]" Do While .Execute = True Set fRng = ActiveDocument.Range(Start:=Selection.Start, End:=Selection.End) With fRng .Text = UCase(.Text) .Collapse Direction:=wdCollapseEnd End With Loop End With End With oRng.Select Set fRng = Nothing: Set oRng = Nothing Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
thanks so much dude. i really want to try this... unfortunatly i cant figure out how to create and run this macro. i get the message that i do not have macros enabled. so i then enable macros by following the instructions... but, i still receive the same message every time. and every time i go and check the settings... and it says that macros are enabled. so i dont know whats up with that. any help there?
thanks so much for your time btw. |
#4
|
||||
|
||||
![]()
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
![]()
macropod. you are a lifesaver. thanks so much man, that totally worked!
|
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wierd symbols inplace of "space", "indentation" etc | aka.bhagvanji | Word | 5 | 02-16-2012 11:50 AM |
"Microsoft Excel Application" missing in the "Component Services" on win08 | sword.fish | Excel | 0 | 02-26-2010 02:09 PM |
How do I change the "and" to "or" with multiple Rules (and Alerts)? | bschimmel | Outlook | 0 | 11-16-2009 05:26 AM |
capitalize first letter of sentences | norco1 | Word | 0 | 06-25-2006 12:37 PM |