Hi StargateFanFromWork,
If you take the macro Graham posted, you can soon modify it to suit your needs. Plus, it's much simpler to maintain than what you've
now got. For example, the following uses your Find/Replace structure with Graham's code and the 500 most common words in the english
language (per
http://www.world-english.org/english500.htm), in order of fequency:
Sub ScratchMacro()
Dim myArray() As String
Dim i As Long
Dim oRng As Word.Range
myArray = Split("the,of,to,and,a,in,is,it,you,that,he,was,for,on,are,with,as,I,his,they,be,at,one,have,this," & _
"from,or,had,by,hot,but,some,what,there,we,can,out,other,were,all,your,when,up,use,word,how,said,an,each,she," & _
"which,do,their,time,if,will,way,about,many,then,them,would,write,like,so,these,her,long,make,thing,see,him,two," & _
"has,look,more,day,could,go,come,did,my,sound,no,most,number,who,over,know,water,than,call,first,people,may," & _
"down,side,been,now,find,any,new,work,part,take,get,place,made,live,where,after,back,little,only,round,man,year," & _
"came,Show,every,good,Me,give,our,under,Name,very,through,just,form,much,great,think,say,Help,low,Line,Before," & _
"turn,cause,same,mean,differ,move,right,boy,old,too,does,tell,sentence,set,three,want,air,well,also,play,small," & _
"end,put,home,read,hand,port,large,spell,add,even,land,here,must,big,high,such,follow,act,why,ask,men,change," & _
"went,light,kind,off,need,house,picture,try,us,again,animal,point,mother,world,near,build,self,earth,father," & _
"head,stand,own,page,should,country,found,answer,school,grow,study,still,learn,plant,cover,food,sun,four,thought," & _
"let,keep,eye,never,last,door,between,city,tree,cross,since,hard,Start,might,story,saw,far,sea,draw,Left,late," & _
"Run,don't,while,press,close,night,real,life,few,stop,open,seem,together,next,white,children,begin,got,walk," & _
"example,ease,paper,often,always,music,those,both,mark,book,letter,until,mile,river,car,feet,care,second,group," & _
"carry,took,rain,eat,room,friend,began,idea,fish,mountain,north,once,base,hear,horse,cut,sure,watch,color,face," & _
"wood,main,enough,plain,girl,usual,young,ready,above,ever,red,list,though,feel,talk,bird,soon,body,dog,family," & _
"direct,pose,leave,song,measure,state,product,black,short,numeral,class,wind,question,happen,complete,ship,area," & _
"half,rock,order,fire,south,problem,piece,told,knew,pass,farm,Top,whole,king,Size,heard,best,Hour,better,True," & _
"during,hundred,am,remember,step,early,hold,west,ground,interest,reach,fast,five,sing,listen,six,Table,travel,less," & _
"morning,ten,simple,several,vowel,toward,war,lay,against,Pattern,slow,center,love,person,money,serve,appear,road," & _
"map,science,rule,govern,pull,cold,notice,voice,fall,power,town,fine,certain,fly,unit,lead,cry,dark,machine,note," & _
"wait,plan,figure,star,box,noun,field,rest,correct,able,pound,done,beauty,drive,stood,contain,front,teach,week,final," & _
"gave,green,oh,quick,develop,sleep,warm,free,minute,strong,special,mind,behind,clear,tail,produce,fact,street,inch," & _
"lot,nothing,course,stay,wheel,full,force,blue,object,decide,surface,deep,moon,island,foot,yet,busy,test,record," & _
"boat,common,gold,possible,plane,age,dry,wonder,laugh,thousand,ago,ran,check,game,shape,yes,hot,miss,brought,heat," & _
"snow,bed,bring,sit,perhaps,fill,east,weight,language,among", ",")
Set oRng = ActiveDocument.Range
For i = 0 To UBound(myArray)
With oRng.Find
.Text = "^p" & myArray(i) & "^p"
.Replacement.Text = "^p"
.Execute Replace:=wdReplaceAll
End With
Next i
End Sub
If you want to add more words, simply insert them with a preceding ',' into the array after 'among'.
See
http://www.paulnoll.com/Books/Clear-English/English-3000-common-words.html
if you want to extend the array to 3000 'american english' words.
Cheers