Activating Word (bringing it to focus)

T

Todor Todorov

My app uses Word automation to control it and create a document (a mail
merged document). It works fine, except that in some cases Word does not get
activated. The user does not see the new document and things something went
wrong.

What is the correct way to force activate Word and bring the new document as
the active app window?

I can live with a solution that only works for Word XP and 2003, but Word
2000 would be nice.

Thansk!
 
P

Peter Huang [MSFT]

Hi Todor,

In Word's Object Modal, we have an Activate method for Application,
Document, Window,
You may have a try to see if that approach works for you.

Here is a link with some code for your reference.
Activate Method
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbawd11/htm
l/womthActivate1_HV03080518.asp

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top