Текст макроса прилагается
Цитата
Sub Hilight()
'
' Holight Ìàêðîñ
'
'
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Replacement.Font.Bold = True
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Text = "begin"
.Replacement.Text = "begin"
.Execute Replace:=wdReplaceAll
.Text = "end"
.Replacement.Text = "end"
.Execute Replace:=wdReplaceAll
.Text = "if"
.Replacement.Text = "if"
.Execute Replace:=wdReplaceAll
.Text = "then"
.Replacement.Text = "then"
.Execute Replace:=wdReplaceAll
.Text = "program"
.Replacement.Text = "program"
.Execute Replace:=wdReplaceAll
.Text = "var"
.Replacement.Text = "var"
.Execute Replace:=wdReplaceAll
.Text = "repeat"
.Replacement.Text = "repeat"
.Execute Replace:=wdReplaceAll
.Text = "until"
.Replacement.Text = "until"
.Execute Replace:=wdReplaceAll
.Text = "for"
.Replacement.Text = "for"
.Execute Replace:=wdReplaceAll
.Text = "to"
.Replacement.Text = "to"
.Execute Replace:=wdReplaceAll
.Text = "do"
.Replacement.Text = "do"
.Execute Replace:=wdReplaceAll
.Text = "while"
.Replacement.Text = "while"
.Execute Replace:=wdReplaceAll
.Text = "downto"
.Replacement.Text = "downto"
.Execute Replace:=wdReplaceAll
End With
End Sub
'
' Holight Ìàêðîñ
'
'
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Replacement.Font.Bold = True
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Text = "begin"
.Replacement.Text = "begin"
.Execute Replace:=wdReplaceAll
.Text = "end"
.Replacement.Text = "end"
.Execute Replace:=wdReplaceAll
.Text = "if"
.Replacement.Text = "if"
.Execute Replace:=wdReplaceAll
.Text = "then"
.Replacement.Text = "then"
.Execute Replace:=wdReplaceAll
.Text = "program"
.Replacement.Text = "program"
.Execute Replace:=wdReplaceAll
.Text = "var"
.Replacement.Text = "var"
.Execute Replace:=wdReplaceAll
.Text = "repeat"
.Replacement.Text = "repeat"
.Execute Replace:=wdReplaceAll
.Text = "until"
.Replacement.Text = "until"
.Execute Replace:=wdReplaceAll
.Text = "for"
.Replacement.Text = "for"
.Execute Replace:=wdReplaceAll
.Text = "to"
.Replacement.Text = "to"
.Execute Replace:=wdReplaceAll
.Text = "do"
.Replacement.Text = "do"
.Execute Replace:=wdReplaceAll
.Text = "while"
.Replacement.Text = "while"
.Execute Replace:=wdReplaceAll
.Text = "downto"
.Replacement.Text = "downto"
.Execute Replace:=wdReplaceAll
End With
End Sub