Public Function ToTitleCase(ByVal InputString As String, Optional ByVal RemoveSpaces As Boolean = False) As String
Converts a string to TitleCase, thus capitalizing each first character of each word (including the first) and lower casing all the rest. Will always remove all double spaces.
SendDebug(ToTitleCase("Hello, HOW do you do?")) 'Prints "Hello, How Do You Do?"
SendDebug(ToTitleCase("Hello, HOW do you do?", True)) 'Prints "Hello,HowDoYouDo?"