![]() |
|
#2
|
||||
|
||||
|
The following macro should do the job
Code:
Sub FormatTimeCode()
Dim oRng As Range
Set oRng = ActiveDocument.Range
With oRng.Find
Do While .Execute(FindText:="[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}.[0-9]{1,2} [a-z]", MatchWildcards:=True)
oRng.Characters.Last.Case = wdUpperCase
oRng.Characters.Last.InsertBefore vbTab
oRng.Collapse 0
Loop
End With
lbl_Exit:
Set oRng = Nothing
Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Only Capitalize First Letter & Delete Last Name
|
zulhfreelancer | Excel | 5 | 12-10-2012 07:51 AM |
| Exceptions for 'Capitalize first letter of sentences' | gazpacho | Word | 1 | 01-12-2012 11:43 AM |
Macro to get first letter of a page in the header
|
faramir | Word VBA | 4 | 11-16-2011 05:43 AM |
is it possibe to capitalize every letter after a "colon space"
|
angeltread | Word VBA | 4 | 01-17-2011 03:50 PM |
| capitalize first letter of sentences | norco1 | Word | 0 | 06-25-2006 12:37 PM |