Selection. The HomeKey Unit:=wdStory
Selection. The Find. ClearFormatting
Selection. The Find. The Font, Bold=True
Selection. The Find. Replacement. ClearFormatting
With the Selection. The Find
The Text="Mercury Accumulation"
. Replacement. Text="Mercury Accumulation ^ p elemental Mercury Accumulation"
The Forward=True
The Wrap=wdFindContinue
. The Format=True
The MatchCase=False
. MatchWholeWord=False
. MatchByte=True
. MatchWildcards=False
. MatchSoundsLike=False
. MatchAllWordForms=False
End With
With Selection
If. The Find. Forward=True Then
. The Collapse Direction:=wdCollapseStart
The Else
. The Collapse Direction:=wdCollapseEnd
End the If
. The Find. Execute the Replace:=wdReplaceOne
If. The Find. Forward=True Then
. The Collapse Direction:=wdCollapseEnd
The Else
. The Collapse Direction:=wdCollapseStart
End the If
. The Find. The Execute
End With
Selection. The Find. The Execute
Problem is a thesaurus is too big, if all are written as a macro, cannot be performed, because the Office macros at compile time, a process of the code shall not exceed 64000 characters,
So the next step is to need me to put the word inventory in a Excel list, and then call? The small white is very confused
CodePudding user response:
Can put a text file, read line by line, processing, to replace