InfoPath cannot add the event handler error in SharePoint 2010

I got this error while trying to write code in InfoPath 2010. The full error message is “InfoPath cannot add the event handler. Adding Visual Basic or C#.Net code to a form requires Microsoft Visual Studio Tools for Applications (VSTA).

To enable this feature, run Microsoft  Office 2010 setup, and change the Microsoft Visual Studio Tools for Applications options under InfoPath to Run from My Computer. The Microsoft .Net framework 2.0 must be installed before installing VSTA.”

 InfoPath cannot add the event handler error in SharePoint 2010 InfoPath cannot add the event handler error in SharePoint 2010

Solution:
Follow below steps to solve InfoPath cannot add the event handler error.

Step-1:
Go to Start -> Control Pannel -> Programs and then click on Uninstall a program. Then select the Office version you have installed and select Change as shown in the figure below:

 InfoPath cannot add the event handler error in SharePoint 2010
InfoPath cannot add the event handler error in SharePoint 2010

Step-2:
Then Select Add or Remove Features as shown in the figure below and Click Continue.

 InfoPath cannot add the event handler error in SharePoint 2010 InfoPath cannot add the event handler error in SharePoint 2010

Step-3:
Then in the Installation Options Expand Microsoft InfoPath and Select Visual Studio Tools for Applications and click Run from My Computer as shown in the figure below and click on Continue.

InfoPath cannot add the event handler

Once the installation over. Restart the InfoPath and you can able to write code in the InfoPath form.

You may like following InfoPath 2010 SharePoint tutorials:

I hope this InfoPath 2010 tutorial helps to solve error InfoPath cannot add the event handler. Adding Visual Basic or C#.Net code to a form requires Microsoft Visual Studio Tools for Applications (VSTA).

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

>