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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top