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

Re: activating a different document by martinique

martinique
Sat Aug 16 01:47:58 CDT 2003

.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.


"Amy" <awang@avcorp.com> wrote in message
news:049901c362b2$db586550$a401280a@phx.gbl...
> 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