Click here to Skip to main content
15,889,266 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am currently working on an InfoPath ribbon using VSTO. I am using components that change at run time taking into consideration the content of the document. The problem is that when i open multiple documents the information in the ribbon is the same in every documen.

From what i read the addIn is shared across all open documents or windows of InfoPath,
so i am currently looking for a change event, or a focus event on the InfoPath window or the addIn ribbon.

Any help is appreciated.
Thank you
Posted

1 solution

Found it:

C#
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
			InfoPath._Application3 iApplication = (InfoPath._Application3)this.Application;
			events = (InfoPath.ApplicationEvents)iApplication.Events;
			events.WindowActivate += new InfoPath._ApplicationEvents_WindowActivateEventHandler(events_WindowActivate);
		}

		void events_WindowActivate(InfoPath._XDocument pDocument, InfoPath.Window pWindow)
		{
			throw new NotImplementedException();
		}
 
Share this answer
 
Comments
Monjurul Habib 4-Dec-11 15:17pm    
my 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900