<Split from unrelated thread>
I know it sounds incredibly pathetic but this forum does not make it obvious how to start new threads and I cannot figure out how to do it. In any case, I have the following code. It takes about 3 or 4 seconds to execute. I was wondering if anyone knew how to speed it up.
[code]
With ActiveDocument.Content.Find
.Text = "a^"
.Replacement.Text = ChrW(&H2200)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "pr+"
.Replacement.Text = ChrW(&H3C6)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "x^"
.Replacement.Text = ChrW(&H2261)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "c^"
.Replacement.Text = ChrW(&H21D2)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "[["
.Replacement.Text = ChrW(&H27E6)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "]]"
.Replacement.Text = ChrW(&H22E7)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "ta+"
.Replacement.Text = ChrW(&H22A4)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "co+"
.Replacement.Text = ChrW(&H22A5)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "no+"
.Replacement.Text = ChrW(&H418)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "ab+"
.Replacement.Text = ChrW(&H2207)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "ng+"
.Replacement.Text = ChrW(&H2310)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "nq+"
.Replacement.Text = ChrW(&H2985)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "//"
.Replacement.Text = ChrW(&H2997)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "\\"
.Replacement.Text = ChrW(&H2998)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "ac+"
.Replacement.Text = ChrW(&H4D2)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "m^"
.Replacement.Text = ChrW(&H3A0)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "n^"
.Replacement.Text = ChrW(&H25A1)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "p^"
.Replacement.Text = ChrW(&H22C4)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "t^"
.Replacement.Text = ChrW(&H2192)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "xor"
.Replacement.Text = ChrW(&H2295)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "i^"
.Replacement.Text = ChrW(&H22A2)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "en+"
.Replacement.Text = ChrW(&H22A8)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "f^"
.Replacement.Text = ChrW(&H3C0)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "e^"
.Replacement.Text = ChrW(&H2203)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.Text = "va+"
.Replacement.Text = ChrW(&H3B1)
.Font.Size = 12
.Replacement.ClearFormatting
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
[/code]