activating a different document

A

Amy

This is a pretty basic question, but I can't seem to find
the answer on the Internet.

I have two documents open and I want to be able to
activate them through a macro embedded in one of the
files. The name of the other file is always different.

What is the command for activating the other open document?

Thanks in advance!

Amy
 
M

martinique

..Activate is the command. If you have variables representing your documents
(perhaps set when the documents are opened) you can use DocVar.activate.

Or you can use the Documents() collection: eg Documents(1).activate, or
Documents(DocName).Activate

Documents within the collection are numbered in order of opening
(Documents(1) is the last document you opened) or use the document name.
 

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