M
MikeT
Hello,
I have a macro that causes Word to hang when the macro is run in a document
that contains comments (the comment "bubbles"). In my macro, I use the
Selection.MoveUntil method and pass in a negative number or the wdBackward
constant. If the current selection is in front of a comment, MoveUntil hangs
word if I try to "back up" over the comment.
Here is a simple macro that shows the problem:
Public Sub GoToPrevStar()
Selection.MoveUntil "*", wdBackward
End Sub
Here is an example of a simple document that can be used to reproduce the
problem:
"The * [insert comment here]quick brown fox"
If I place my cursor after the comment (for example, between quick and
brown) and run the GoToPrevStar macro, Word hangs. If I take out the comment,
the macro works fine.
I have tested this in Word 2003 and Word 2002 and it hangs in both versions.
Has anyone heard of this problem or a workaround?
Thanks,
Mike
I have a macro that causes Word to hang when the macro is run in a document
that contains comments (the comment "bubbles"). In my macro, I use the
Selection.MoveUntil method and pass in a negative number or the wdBackward
constant. If the current selection is in front of a comment, MoveUntil hangs
word if I try to "back up" over the comment.
Here is a simple macro that shows the problem:
Public Sub GoToPrevStar()
Selection.MoveUntil "*", wdBackward
End Sub
Here is an example of a simple document that can be used to reproduce the
problem:
"The * [insert comment here]quick brown fox"
If I place my cursor after the comment (for example, between quick and
brown) and run the GoToPrevStar macro, Word hangs. If I take out the comment,
the macro works fine.
I have tested this in Word 2003 and Word 2002 and it hangs in both versions.
Has anyone heard of this problem or a workaround?
Thanks,
Mike