J
Jay Freedman
Several things to investigate (I have no idea which if any of them will turn
out to be at fault):
- Do you have an End If statement to close the If .Range.Text statement? Is
it in the right place, right after the last .Cells statement of the ElseIf
sequence?
- Single-step through the macro using the F8 key. When you get to the If
..Range.Text statement, exactly what is the value of .Range.Text? Maybe it's
more than one character, in which case the If condition would be False. Be
especially aware that it could be a punctuation character followed by one or
more spaces. Try using statements like this:
If Trim(.Range.Text) = "," Then
The Trim() function removes any leading or trailing spaces from the string.
- While you're single-stepping the macro, verify that the execution does get
to the If .Range.Text statement -- maybe the oRevision.Type value isn't
wdRevisionDelete.
A minor correction: the character ":" is a colon, not a semicolon.
--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
out to be at fault):
- Do you have an End If statement to close the If .Range.Text statement? Is
it in the right place, right after the last .Cells statement of the ElseIf
sequence?
- Single-step through the macro using the F8 key. When you get to the If
..Range.Text statement, exactly what is the value of .Range.Text? Maybe it's
more than one character, in which case the If condition would be False. Be
especially aware that it could be a punctuation character followed by one or
more spaces. Try using statements like this:
If Trim(.Range.Text) = "," Then
The Trim() function removes any leading or trailing spaces from the string.
- While you're single-stepping the macro, verify that the execution does get
to the If .Range.Text statement -- maybe the oRevision.Type value isn't
wdRevisionDelete.
A minor correction: the character ":" is a colon, not a semicolon.
--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.