Hi All,
Basically i want to ask two questions..
1) In my application, i open the word document, insert some texts at pre
defined book marks and also inserting the shapes and things like that. And
then i make application visible..so, application is visble with complete data
in its document. But at the beginning of that application, some text is
selected..i dont want ant thing to be selected in the document..can you
please suggest me any possibilities..?

my second question is..
2) i keep open the previous document but not in the fore ground and then i
open a new document programatically, again i insert my data in it, and then
call application visble again..but this time..the application or the
document doesn't come in to fore ground. I tried activating the document
also, but it didn't hep me.
Please help me in these two questions..

Thanks in advance.

Re: Re - Activating the application by Helmut

Helmut
Thu Jan 13 09:31:47 CST 2005

Hi Basavaraj,
1)
there seems always to be a selection.
I think, the best you can do, is to collapse the selection.
Selection.Collapse

2)
Maybe this can help:

Karl E. Peterson's One-Stop Source Shop
http://www.mvps.org/vb/code/ForceFore.zip

Greetings from Bavaria, Germany

Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/

Re: Re - Activating the application by Basavaraj

Basavaraj
Mon Jan 17 00:31:02 CST 2005

Hi Helmut,
Thanks alot for your suggessions.
First one worked wonderfully for me. In C++, this Collapse method expects a
VARIANT object that tells abt the direction, but as i din't know anything abt
this, i just sent a defualt empty variable for this and it worked.
Thank you very much.

But the second one, it uses the windiws method like SetBackgroundWindow and
things like that which are commonly used in windows applications which needs
windows handlw that needs to be brought in to foreground. Here, i dont get MS
Word document/windows handle..so, its not specific to MS Word programming but
its very generic one. Anyhow,
thank you very much for your suggession.



"Helmut Weber" wrote:

> Hi Basavaraj,
> 1)
> there seems always to be a selection.
> I think, the best you can do, is to collapse the selection.
> Selection.Collapse
>
> 2)
> Maybe this can help:
>
> Karl E. Peterson's One-Stop Source Shop
> http://www.mvps.org/vb/code/ForceFore.zip
>
> Greetings from Bavaria, Germany
>
> Helmut Weber, MVP
> "red.sys" & chr(64) & "t-online.de"
> Word XP, Win 98
> http://word.mvps.org/
>