First, and most important, you should use Option Explicit and declare variables. Doing so prevents a lot of bugs and runtime errors.
The problem you are having is that Word has an object called a Range, and Excel has an object called a Range. They are completely different but you are trying to assign one to the other, so you get a type mismatch.
When you run this code in Excel, Excel assumes this is an Excel Range. From context, I think you want it to be a Word Range. Change the declaration to this:
Your code works in Word because Range is assumed to be a Word Range when you are running this code under Word.
I can't do any testing without an example Word file to go with this code, but I'm pretty sure this will fix your problem.
Bookmarks