AutoCorrect feature is used to correct typos and misspelled words (dont to don’t), as well as to insert symbols ((c) as ©) and other pieces of text. AutoCorrect is set up by default with a list of typical misspellings and symbols. If you want to add more entries, you can do that by following
Office Button - -> Word Options - -> Proofing Tab - - >Autocorrect Options
Add the mistyped word and the replacement in Replace Box -- >Add
Barak Obama is the democratic presidential candidate will become Barack Obama is the democratic presidential candidate once you type.
The same can be achieved through Word VBA / Excel VBA
Excel VBA Code:
Sub Add_AutoCorrect_Entry_XL()
On Error GoTo Err_Label
' ---------------------------------------------
' Coded by Shasur for www.vbadud.blogspot.com
' ---------------------------------------------
Application.AutoCorrect.AddReplacement "VBADUD Plc", "VBADUD Inc"
Application.AutoCorrect.AddReplacement "Barak Obama", "Barack Obama"
Err_Label:
If Err <> 0 Then
MsgBox(Err.Description)
Err.Clear
End If
End Sub
Word VBA Code:
Sub Add_AutoCorrect_Entry()
On Error GoTo Err_Label
' ---------------------------------------------
' Coded by Shasur for www.vbadud.blogspot.com
' ---------------------------------------------
Application.AutoCorrect.Entries.Add "VBADUD Plc", "VBADUD Inc"
Application.AutoCorrect.Entries.Add "Barak Obama", "Barack Obama"
Err_Label:
If Err <> 0 Then
MsgBox(Err.Description)
Err.Clear
End If
End Sub
0 comments:
Post a Comment