Hi Steve,
have you tried to minimize the application.window?
Like:
Application.WindowState = wdWindowStateMinimize
What is "select case" good for,
if there are only two possibilities?
But I don't know for sure, if "if then else" would be faster.
"Junk" has been declared but seems to be never used.
What error are you trying to catch?
Seems to me, that there can hardly be an error.
Why not checking each range, whether it contains a tag at all,
before starting the replacing?
Like:
if instr(rtmp.text, Tag) = 0 then
As to replacing, I'd try to put
search text and replacement text in arrays
and loop trough them, like:
With rTmp.Find ' a temporary range
For l = 1 To 45
' array of text to be found
.Text = TextFind(l)
' array of the replacement text
.Replacement.Text = TextReplace(l)
.Execute Replace:=wdReplaceAll
if instr(rtmp.text, Tag) = 0 then exit for
Next
End With
You may even do all operations on a string
representing the range's text...
But it's a matter of trial and error,
depending on your doc.
HTH

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Steve Cronin - 17 Mar 2006 06:23 GMT
Helmut:
Thanks for the reply and good thoughts!
So I've taken your advice (use arrays and process the string) and have
come up with what is below but it doesn't work because I'm not
referencing the string correctly in Find.
How do you do that?
If InStr(storyRange.Text, "<") > 0 Then
tStr = storyRange.Text
For i = 0 To 48
tStr.Range.Find.Execute FindText:=tagArray(i, 0), ReplaceWith:=
tagArray(i, 1), Replace:=wdReplaceAll, Forward:=True, Wrap:=
wdFindContinue, MatchCase:=True, MatchWholeWord:=True
If instr( tStr, "<") = 0 then Then Exit For
Next
storyRange.Text = tStr
End If
Helmut Weber - 17 Mar 2006 09:17 GMT
Hi Steve,
I'd first search the range in the more conventional way
and see, whether this is fast enough.
Because of formatting issues, too.
If formatting isn't a problem then you may operate on a string.
But you can't use range with string, like "tStr.range"
For rearching and replacing in a string,
see help on "replace-function", which is available
in Versions from Word 2000 on, I think.

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000