Word.Application.Activate() fails

Add-in Express™ Support Service
That's what is more important than anything else

Word.Application.Activate() fails
 
Patrick Jox


Guest


Sorry, that I have to come back to this topic. I am sure this is not an issue of Add-In-Express. But here are the experts.

I am still having problems when opening word, create a new document and then activate word before fill it out.

Here is my code.

wa.DocumentOpen += new Word.ApplicationEvents2_DocumentOpenEventHandler(wa_NewDocument);
				
wd = wa.Documents.Add(ref template, ref missing, ref missing, ref missing);
appstarted = false;

while (!appStarted)
    System.Threading.Thread.Sl eep(10);

wa.DocumentOpen -= new Word.ApplicationEvents2_DocumentOpenEventHandler(wa_NewDocument);

wa.Visible = true;
wa.Activate();


In DocumentOpen event the value of appStarted is set to true. I tried also the NewDocument event to wait for. But no result.

Kind regards
Patrick
Posted 16 Oct, 2010 08:38:50 Top
Eugene Astafiev


Guest


Hi Patrick,

What Office version do you use? Please note that the http://msdn.microsoft.com/en-us/library/ee691834.aspx method was introduced with Office 2010.
Posted 16 Oct, 2010 12:22:32 Top
Patrick Jox


Guest


I use Office 2010. But I used the Activate Method before. The application was written using Office 2007 and the problems only exist in combination with Office 2010.

Your link leads me to ribbon stuff. But I want to activate the application itself.

Kind regards
Patrick
Posted 16 Oct, 2010 17:02:12 Top
Eugene Astafiev


Guest


Hi Patrick,

Sorry for misleading you. I thought you meant the Activate method of the Ribbon tab.

First of all, please try installing a fresh build of http://www.add-in-express.com/downloads/adxnet.php. Are you able to reproduce the issue with a newly created add-in project? If so, could you please send it to the support e-mail address (see readme.txt)?
Posted 18 Oct, 2010 10:05:02 Top
Patrick Jox


Guest


Eugene, sorry for the delay. I am just delivering an application. I will install the updated build after that. The client is using office 2007 and here it works.

I'll come back later to this.

Kind regards
Patrick
Posted 25 Oct, 2010 03:04:29 Top
Eugene Astafiev


Guest


Hi Patrick,

Good news! Thank you for letting me know!

Anyway, please keep me notified.
Posted 25 Oct, 2010 06:46:34 Top