Hi All,
I have the instance of Documents and i open up the new documents using
Documents.Add method. When i open the first document, it comes in the
foreground. But when i open the second one, the second one has to come
infront. How can achive this? I mean, whenever i open the new document
programatically, i want the new document is in the foreground and visible.

Thanks in advance.

Re: Activating the Newly opened Document by Jezebel

Jezebel
Wed May 04 03:40:46 CDT 2005

Dim pDoc as Word.Document

Set pDoc = Documents.Add .....
pDoc.Activate




"Basavaraj" <Basavaraj@discussions.microsoft.com> wrote in message
news:7ADB1641-3B9A-496D-81BD-87748F4CD21B@microsoft.com...
> Hi All,
> I have the instance of Documents and i open up the new documents using
> Documents.Add method. When i open the first document, it comes in the
> foreground. But when i open the second one, the second one has to come
> infront. How can achive this? I mean, whenever i open the new document
> programatically, i want the new document is in the foreground and visible.
>
> Thanks in advance.



Re: Activating the Newly opened Document by Basavaraj

Basavaraj
Wed May 04 04:51:07 CDT 2005

Hi,
First thing that i tried is Document.Activate.. Ofcourse, i am using these
in C++. I used DISPID 0x71 to make this document activate..Nothing seems to
be working for bringing the new document in foreground.

Please let me know if i am wrong or some new solution exists.

Thanks in advance.

"Jezebel" wrote:

> Dim pDoc as Word.Document
>
> Set pDoc = Documents.Add .....
> pDoc.Activate
>
>
>
>
> "Basavaraj" <Basavaraj@discussions.microsoft.com> wrote in message
> news:7ADB1641-3B9A-496D-81BD-87748F4CD21B@microsoft.com...
> > Hi All,
> > I have the instance of Documents and i open up the new documents using
> > Documents.Add method. When i open the first document, it comes in the
> > foreground. But when i open the second one, the second one has to come
> > infront. How can achive this? I mean, whenever i open the new document
> > programatically, i want the new document is in the foreground and visible.
> >
> > Thanks in advance.
>
>
>

Re: Activating the Newly opened Document by Jezebel

Jezebel
Wed May 04 06:52:25 CDT 2005

If you can explain the "of course" the rest will come clear ...



"Basavaraj" <Basavaraj@discussions.microsoft.com> wrote in message
news:5FAC7BB8-39B4-4AE0-BCAA-AF1F55DDCE8B@microsoft.com...
> Hi,
> First thing that i tried is Document.Activate.. Ofcourse, i am using these
> in C++. I used DISPID 0x71 to make this document activate..Nothing seems
> to
> be working for bringing the new document in foreground.
>
> Please let me know if i am wrong or some new solution exists.
>
> Thanks in advance.
>
> "Jezebel" wrote:
>
>> Dim pDoc as Word.Document
>>
>> Set pDoc = Documents.Add .....
>> pDoc.Activate
>>
>>
>>
>>
>> "Basavaraj" <Basavaraj@discussions.microsoft.com> wrote in message
>> news:7ADB1641-3B9A-496D-81BD-87748F4CD21B@microsoft.com...
>> > Hi All,
>> > I have the instance of Documents and i open up the new documents using
>> > Documents.Add method. When i open the first document, it comes in the
>> > foreground. But when i open the second one, the second one has to come
>> > infront. How can achive this? I mean, whenever i open the new document
>> > programatically, i want the new document is in the foreground and
>> > visible.
>> >
>> > Thanks in advance.
>>
>>
>>



Re: Activating the Newly opened Document by Basavaraj

Basavaraj
Wed May 04 07:05:03 CDT 2005

To be more clear, I am using MS Word application in a C/C++ environment.
So, to call Document.Activate, i used the Dispatch ID 0x71 and called
invoke with this ID. But my second (newly opened) document, is not coming in
foreground.
This is exactly the problem that i am facing.

Hope its clear to you.
Pleae let me know if you need some more info.

"Jezebel" wrote:

> If you can explain the "of course" the rest will come clear ...
>
>
>
> "Basavaraj" <Basavaraj@discussions.microsoft.com> wrote in message
> news:5FAC7BB8-39B4-4AE0-BCAA-AF1F55DDCE8B@microsoft.com...
> > Hi,
> > First thing that i tried is Document.Activate.. Ofcourse, i am using these
> > in C++. I used DISPID 0x71 to make this document activate..Nothing seems
> > to
> > be working for bringing the new document in foreground.
> >
> > Please let me know if i am wrong or some new solution exists.
> >
> > Thanks in advance.
> >
> > "Jezebel" wrote:
> >
> >> Dim pDoc as Word.Document
> >>
> >> Set pDoc = Documents.Add .....
> >> pDoc.Activate
> >>
> >>
> >>
> >>
> >> "Basavaraj" <Basavaraj@discussions.microsoft.com> wrote in message
> >> news:7ADB1641-3B9A-496D-81BD-87748F4CD21B@microsoft.com...
> >> > Hi All,
> >> > I have the instance of Documents and i open up the new documents using
> >> > Documents.Add method. When i open the first document, it comes in the
> >> > foreground. But when i open the second one, the second one has to come
> >> > infront. How can achive this? I mean, whenever i open the new document
> >> > programatically, i want the new document is in the foreground and
> >> > visible.
> >> >
> >> > Thanks in advance.
> >>
> >>
> >>
>
>
>

Re: Activating the Newly opened Document by Basavaraj

Basavaraj
Fri May 13 03:30:08 CDT 2005

I think these APIs wont work properly when i use Dispatch interface and call
invoke with whatever ID that is required. My document is not at all getting
activated even with the proper Disp ID that MS recommends.
Anyway, thanks Jezebel for your suggesion.


"Basavaraj" wrote:

> To be more clear, I am using MS Word application in a C/C++ environment.
> So, to call Document.Activate, i used the Dispatch ID 0x71 and called
> invoke with this ID. But my second (newly opened) document, is not coming in
> foreground.
> This is exactly the problem that i am facing.
>
> Hope its clear to you.
> Pleae let me know if you need some more info.
>
> "Jezebel" wrote:
>
> > If you can explain the "of course" the rest will come clear ...
> >
> >
> >
> > "Basavaraj" <Basavaraj@discussions.microsoft.com> wrote in message
> > news:5FAC7BB8-39B4-4AE0-BCAA-AF1F55DDCE8B@microsoft.com...
> > > Hi,
> > > First thing that i tried is Document.Activate.. Ofcourse, i am using these
> > > in C++. I used DISPID 0x71 to make this document activate..Nothing seems
> > > to
> > > be working for bringing the new document in foreground.
> > >
> > > Please let me know if i am wrong or some new solution exists.
> > >
> > > Thanks in advance.
> > >
> > > "Jezebel" wrote:
> > >
> > >> Dim pDoc as Word.Document
> > >>
> > >> Set pDoc = Documents.Add .....
> > >> pDoc.Activate
> > >>
> > >>
> > >>
> > >>
> > >> "Basavaraj" <Basavaraj@discussions.microsoft.com> wrote in message
> > >> news:7ADB1641-3B9A-496D-81BD-87748F4CD21B@microsoft.com...
> > >> > Hi All,
> > >> > I have the instance of Documents and i open up the new documents using
> > >> > Documents.Add method. When i open the first document, it comes in the
> > >> > foreground. But when i open the second one, the second one has to come
> > >> > infront. How can achive this? I mean, whenever i open the new document
> > >> > programatically, i want the new document is in the foreground and
> > >> > visible.
> > >> >
> > >> > Thanks in advance.
> > >>
> > >>
> > >>
> >
> >
> >