View Single Post
 
Old 12-16-2015, 02:32 PM
BobSundquist BobSundquist is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Dec 2015
Posts: 2
BobSundquist is on a distinguished road
Default AutoCorrectNow

Thanks, I solved the problem of potential multiple words and various word terminators by just selecting text the size of each entry. Also "Option Compare Text" is needed to make it case-insensitive.

Option Compare Text
Sub AutoCorrectNow()
Dim orng As Range

For Each Entry In Word.Application.AutoCorrect.Entries
Set orng = Selection.Range
orng.MoveStart wdCharacter, -Len(Entry.Name)
If orng.Text = Entry.Name Then
Entry.Apply orng
Exit For
End If
Next
End Sub
Reply With Quote