Sub ConvertReadable()
Dim wordCount As Integer
Dim tempWord As String
Dim ltrholder As String
Dim x As String
Dim space As Boolean
Dim num(10) As Integer
Dim j As Integer
Dim CapitalWord(10) As String
'define your word list for known words that you need to capitalize
CapitalWord(0) = "New York"
CapitalWord(1) = "Berlin"
CapitalWord(2) = "Superman"
CapitalWord(3) = "Titanic"
CapitalWord(4) = "your word here"
CapitalWord(5) = "your word here"
CapitalWord(6) = "your word here"
CapitalWord(7) = "your word here"
'get the total number of words in this doc
wordCount = ThisDocument.BuiltInDocumentProperties(wdPropertyWords)
For j = 0 To 9
num(j) = j
Next
j = 0
'No need to check for numbers
'Convert the first letter to capital if it follows a period
'seems there is a bug in Microsoft word that it counts punctuations as words too
'so we won't finish converting the document. Therefore we must
'add more to the total word count
For i = 1 To (wordCount + 100)
tempWord = ThisDocument.words.Item(i)
tempWord = StrConv(tempWord, vbLowerCase)
If StrComp(Right(tempWord, 1), " ", 1) = 0 Then 'if there is a space after the word
tempWord = RTrim(tempWord) 'make sure you trim the space before compare
space = True
Else
space = False
End If
For j = 0 To 7
If StrComp(tempWord, CapitalWord(j), 1) = 0 Then 'if it is a word need a capital letter
ltrholder = Left(tempWord, 1)
ltrholder = StrConv(ltrholder, vbUpperCase)
tempWord = ltrholder + Right(tempWord, Len(tempWord) - 1)
End If
Next
If space = True Then
ThisDocument.words(i) = tempWord + " " 'make sure you add back the space that you trimmed earlier
Else
ThisDocument.words(i) = tempWord
End If
Next
End Sub
               (
geocities.com/time_edge)