Running for wrong window

J

James Joy

Having a problem with a macro under Word 2003.

It runs fine with one document, but as soon as you have
multiply documents open you can never be 100% sure which
one it is going to run for.

I have tried doing things like going to the bottom and
top of the document but it still does not work.
 
D

DA

Hi James

When you have multiple documents open, set the focus by
using the Activate command.
e.g.
Documents("Document1").Activate

All the best,
Dennis
 
Top