Application Events in Office 2007

A

Alice Graham

I am writing an addin for Word 2007 using C# and VSTO.

I want to work with events, but am not sure on the correct way to do this.

At the minute I have:
((ApplicationEvents4_Event)application).NewDocument += new
Microsoft.Office.Interop.Word.ApplicationEvents2_NewDocumentEventHandler(AppEvents_NewDocument);

Then I also have a method called AppEvents_NewDocument where I do my work.

The documentation that I find says that ApplicationEvents4_Event interface
is the events interface for Word 2003 (ApplicationEvents3_Event for 2002 and
ApplicationEvents2_Event for 2000).

My question is, what events interface should I use for Word 2007?
 
C

Cindy M.

Hi =?Utf-8?B?QWxpY2UgR3JhaGFt?=,
I am writing an addin for Word 2007 using C# and VSTO.

I want to work with events, but am not sure on the correct way to do this.

At the minute I have:
((ApplicationEvents4_Event)application).NewDocument += new
Microsoft.Office.Interop.Word.ApplicationEvents2_NewDocumentEventHandler(AppEvents_NewDocument);

Then I also have a method called AppEvents_NewDocument where I do my work.

The documentation that I find says that ApplicationEvents4_Event interface
is the events interface for Word 2003 (ApplicationEvents3_Event for 2002 and
ApplicationEvents2_Event for 2000).

My question is, what events interface should I use for Word 2007?
I believe Word 2007 uses the same events interface as 2003 (ApplicationEvents4).

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup
and not by e-mail :)
 
A

Alice Graham

Thanks Cindy

Cindy M. said:
Hi =?Utf-8?B?QWxpY2UgR3JhaGFt?=,

I believe Word 2007 uses the same events interface as 2003 (ApplicationEvents4).

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)


This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup
and not by e-mail :)
 

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