Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2005

Tip: Looking for answers? Try searching our database.

Re - Activating the application

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Basavaraj - 13 Jan 2005 03:37 GMT
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.
Helmut Weber - 13 Jan 2005 15:31 GMT
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/
Basavaraj - 17 Jan 2005 06:31 GMT
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.

> Hi Basavaraj,
> 1)
[quoted text clipped - 14 lines]
> Word XP, Win 98
> http://word.mvps.org/

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.