Re: Word in background in Vista
- From: "Jan Hyde (VB MVP)" <StellaDrinker@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 12 Apr 2007 15:45:38 +0100
TommyD <TommyD@xxxxxxxxxxxxxxxxxxxxxxxxx>'s wild thoughts
were released on Thu, 12 Apr 2007 06:38:03 -0700 bearing the
following fruit:
Tried Activate, didn't help.
/Tommy
OK, I just tried your code and word appears at the back.
I added an Active and word appears at the front.
Dim objWord As Object
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
objWord.Activate
J
"Jan Hyde (VB MVP)" wrote:
TommyD <TommyD@xxxxxxxxxxxxxxxxxxxxxxxxx>'s wild thoughts
were released on Thu, 12 Apr 2007 03:56:02 -0700 bearing the
following fruit:
Hi,
I have a vb6 app which opens Word and inserts some text into the Word
document.
When using Win2k/WinXp Word opens in front but when using Vista Word opens
in the background of my app, why?
This is the code I use:
Dim objWord As Object
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
IIRC they made a change with XP to prevent applications from
stealing the focus (which could be annoying) they seem to
have taken this further with Vista. However it doesn't make
a distinction beween other apps and apps lauched by you app
the *should* steal focus.
Try calling the Activate method of Word (or is it the
document itself?) anyway IIRC that should bring it to the
front.
J
Thanks
Tommy
.
- Follow-Ups:
- Re: Word in background in Vista
- From: TommyD
- Re: Word in background in Vista
- References:
- Re: Word in background in Vista
- From: Jan Hyde (VB MVP)
- Re: Word in background in Vista
- Prev by Date: Re: Error Message VB6
- Next by Date: Re: Where can I download (or buy Visual Basic 6)
- Previous by thread: Re: Word in background in Vista
- Next by thread: Re: Word in background in Vista
- Index(es):
Relevant Pages
|