View Single Post
 
Old 10-16-2020, 05:41 AM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2010
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by shmueldabomb441 View Post
I have confidently concluded that the auto correct entries are stored in normal.DOTM. How would the code change based on that?
You wouldn't. The code is for making corrections based on entries in a Custom Dictionary - which is what the SpellingErrors object ordinarily applies to - and your thread title does say «Replace all custom dictionary words». Accordingly, to use the code I posted, you'd create a Custom Dictionary with the corrections concerned. Of course, that also presupposes Word would be able to recognize which 'correction' goes with what 'error'.

To work with AutoCorrect entries, you might use code like:
Code:
Sub AutoTransliterate()
Application.ScreenUpdating = False
Dim Rng As Range, ACE As AutoCorrectEntry
For Each Rng In ActiveDocument.Range.SpellingErrors
  For Each ACE In AutoCorrect.Entries
    If Rng.Text = ACE.Name Then Rng.Text = ACE.Value
  Next
Next
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote