Sub fromBestSubset()
LR = False
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Execute FindText:="Logistic Regression",
Forward:=True, MatchWildcards:=False
If .Found Then LR = True
End With
If LR Then
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "Block
0:?@Block 1: "
.Replacement.Text =
""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = True
.MatchSoundsLike = False
.MatchAllWordForms =
False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End If
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.ColorIndex = wdBlue
tx
= "[abc]?[0-9]{1,}.[0-9]{1,}%"
If
LR Then tx = "Overall Percentage^t^t^t^t?@a^t"
With Selection.Find
.Text = tx
.Replacement.Text =
""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = True
.MatchSoundsLike = False
.MatchAllWordForms =
False
End With
Selection.Find.Execute Replace:=wdReplaceAll
tx
= "/VARIABLES=(v*)/"
If
LR Then tx = "METHOD = ENTER (v*)/"
With Selection.Find
.Text = tx
.Replacement.Text =
"\1"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = True
.MatchSoundsLike = False
.MatchAllWordForms =
False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Execute
Selection.Find.Replacement.ClearFormatting
Selection.Find.Font.ColorIndex = wdAuto
With Selection.Find
.Text = ""
.Replacement.Text =
""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase =
False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms =
False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
If LR = False Then
With Selection.Find
.Text = "%v"
.Replacement.Text =
"^pv"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord =
False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms =
False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^?a"
.Replacement.Text =
""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms =
False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End If
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
tx = "%[bc]": tx1 = ""
If LR Then tx = "([0-9])?Overall
Percentage^t^t^t^t": tx1 = "\1^t"
With Selection.Find
.Text = tx
.Replacement.Text = tx1
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = True
.MatchSoundsLike = False
.MatchAllWordForms =
False
End With
Selection.Find.Execute Replace:=wdReplaceAll
tx = "%": tx1 = ""
If LR Then tx = "a^t": tx1 = ""
With
Selection.Find
.Text = tx
.Replacement.Text = tx1
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms =
False
End With
Selection.Find.Execute Replace:=wdReplaceAll
If
LR Then
With Selection.Find
.ClearFormatting
.Text = "^t{2,}"
.Replacement.Text = "^t"
.MatchWildcards = True
.Execute Replace:=wdReplaceAll
End With
End If
End Sub