Trap project Activate event in VSTO

A

angus404

I am creating a VSTO add in and am trying to hook into the events. I have
been able to hook into the ProjectBeforeSave and ProjectBeforeTaskChange
events with no problem.

However, I cannot get the Activate event to work. This is what I've tried:

Globals.ThisAddIn.Application.ActiveProject.Activate += new
Microsoft.Office.Interop.MSProject._EProjectDoc_ActivateEventHandler(proj_Activate);

I get a warning that says "Ambiguity between method
'Microsoft.Office.Interop.MSProject._IProjectDoc.Activate()' and non-method
'Microsoft.Office.Interop.MSProject._EProjectDoc_Event.Activate'. Using
method group."

The application won't compile. How do I get it to recognize that I am trying
to use the Activate event, and not the Activate method?

Or, is there a different event that will fire when each project is activated?
 

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