View Single Post
  #4   Report Post  
Steward Spergs Steward Spergs is offline
Junior Member
 
Posts: 1
Smile

Quote:
Originally Posted by Graham Mayor View Post
Create your common list of replacements in a two column table - first column
the words you are looking for, the second with their replacements. Save the
document then run the following macro having changed the filename and path
of the table document in the line:
Set ChangeDoc = Documents.Open("D:\My Documents\Test\changes.doc")

Sub ReplaceFromTableList()
Dim ChangeDoc As Document, RefDoc As Document
Dim ctable As Table
Dim oldpart As Range, newpart As Range
Dim i As Long
Set RefDoc = ActiveDocument
Set ChangeDoc = Documents.Open("D:\My Documents\Test\changes.doc")
Set ctable = ChangeDoc.Tables(1)
RefDoc.Activate
For i = 1 To ctable.Rows.Count
Set oldpart = ctable.Cell(i, 1).Range
oldpart.End = oldpart.End - 1
Set newpart = ctable.Cell(i, 2).Range
newpart.End = newpart.End - 1
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
.Execute findText:=oldpart, _
ReplaceWith:=newpart, _
replace:=wdReplaceAll, _
MatchWildcards:=False, _
Forward:=True, _
Wrap:=wdFindContinue
End With
Next i
ChangeDoc.Close wdDoNotSaveChanges
End Sub

See http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


This looks like something that will be so helpful! In Word, I am always adding words to autocorrect that I commonly mix up like "liek" with "like". I do this by adding words to autocorrect by clicking on options, then proofing, then click on auto correct options which allows me to add new words. My question for you is how can I copy all the words I have saved under the autocorrect list so that I can post them on the two columns in another document like you said to do so that I can have pasted texts auto corrected and not have to waste time with the spell check.
Thanks again for posting what you posted!