The order of the lines actually matters.
The Selection.Find.Execute should be the last line, not the first.
If you cut the selection, the cursor will be showing no selection so that Selection.Find will be working across the whole document. Your code doesn't then paste the cut section back in to the document but even if you added that back in, it likely would go to the location where the last replace happened.
If Selection.Cut is throwing an error, perhaps you have selected something that is protected and can't be removed.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|