Go Back   Cyber Tech Help Support Forums > Software > Applications

Notices

Reply
 
Topic Tools
  #1  
Old May 8th, 2017, 09:02 AM
Lacece Lacece is offline
New Member
 
Join Date: May 2017
Posts: 2
how to add multiple autocorrect entries to Word

HI,

I have a table with some terminologies and their abbreviation. I want to add this abbreviation as autocorrect entries, so I can entry a abbreviation to get its whole terminology.

But it seems that word can only add autocorrect entry one by one. Any way to bach add multiple autocorrect entries in Word ? Thank you . I'm using word 2010.
Reply With Quote


  #2  
Old May 11th, 2017, 03:18 AM
joyemily joyemily is offline
New Member
 
Join Date: May 2017
Posts: 1
hi,

Try to use word VBA. Try the macro below:

Before that , open a blank word document ,insert the table with terminologies and their abbreviations.
Please note you need to put the abbreviation inn the first column, and terminologies in the second column.

Run this macro

Sub BatchAddAutoCorrectEntries()
Dim objTable As Table
Dim objOriginalWord As Cell
Dim objOriginalWordRange As Range
Dim objReplaceWordRange As Range
Dim nRowNumber As Integer

Set objTable = ActiveDocument.Tables(1)
nRowNumber = 1
For Each objOriginalWord In objTable.Columns(1).Cells
Set objOriginalWordRange = objOriginalWord.Range
objOriginalWordRange.MoveEnd Unit:=wdCharacter, Count:=-1
Set objReplaceWordRange = objTable.Cell(nRowNumber, 2).Range
objReplaceWordRange.MoveEnd Unit:=wdCharacter, Count:=-1

AutoCorrect.Entries.Add Name:=objOriginalWordRange.Text, Value:=objReplaceWordRange.Text

nRowNumber = nRowNumber + 1
Next objOriginalWord

Msgbox("All autocorrect items in the table1 are added.")
End Sub
Reply With Quote
  #3  
Old May 19th, 2017, 02:45 AM
Lacece Lacece is offline
New Member
 
Join Date: May 2017
Posts: 2
Thank you ! It works!
Reply With Quote
Reply

Bookmarks

Topic Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump




All times are GMT +1. The time now is 07:04 AM.