For converting selected text in Microsoft Word to title case, I found the following useful macro at: keyboard shortcut for title case in word 2010
I'm wondering if there is a way to modify the macro so that it always capitalizes a word the follows a colon, even if the word is on the "exceptions" list (e.g., and, of, in, the).
Sub TitleCase()
Dim lclist As String
Dim wrd As Integer
Dim sTest As String
' list of lowercase words, surrounded by spaces
lclist = " of the by to is from a and but as at in "
Selection.Range.Case = wdTitleWord
For wrd = 2 To Selection.Range.Words.Count
sTest = Trim(Selection.Range.Words(wrd))
sTest = " " & LCase(sTest) & " "
If InStr(lclist, sTest) Then
Selection.Range.Words(wrd).Case = wdLowerCase
End If
Next wrd
End Sub
For example, if the following text were selected, "this is my title: the subtitle goes here", the result would be: "This Is My Title: The Subtitle Goes Here", even though "the" is on the exceptions list.
the
out of the list.