V
Vivian Carroll
In a Word 2000 template, I have a macro button that deletes the selected
paragraph and then runs the following procedure to find the @ symbol. In
Word 2000, when this macro button is in the last paragraph of the document,
the paragraph gets deleted and the cursor stays at the end of the document
because there are no @ symbols after it. It does not ask the user whether to
continue searching at the beginning. This is what I want.
With Selection.Find
.ClearFormatting
.Text = "@"
.Forward = True
.Wrap = wdFindAsk
.Execute
End With
However, in Word 2002, when I click the macro button, the cursor cycles up
to the top of the document and selects the first @ symbol it finds. I
thought that ".wrap = wdFindAsk" would at least make it ask the user whether
to go to the top of the document but it doesn't.
QUESTION: In Word 2002, how do I make it stop at the end of the document if
it does not find an @ symbol (and not ask the user whether to start at the
beginning)?
TIA,
Vivian
paragraph and then runs the following procedure to find the @ symbol. In
Word 2000, when this macro button is in the last paragraph of the document,
the paragraph gets deleted and the cursor stays at the end of the document
because there are no @ symbols after it. It does not ask the user whether to
continue searching at the beginning. This is what I want.
With Selection.Find
.ClearFormatting
.Text = "@"
.Forward = True
.Wrap = wdFindAsk
.Execute
End With
However, in Word 2002, when I click the macro button, the cursor cycles up
to the top of the document and selects the first @ symbol it finds. I
thought that ".wrap = wdFindAsk" would at least make it ask the user whether
to go to the top of the document but it doesn't.
QUESTION: In Word 2002, how do I make it stop at the end of the document if
it does not find an @ symbol (and not ask the user whether to start at the
beginning)?
TIA,
Vivian