Friday, February 10, 2012

CoCreateInstance failed to create the control Error

Issue:


While trying to add 'Contact Selector' to the Infopath controls, you get the below error:


CoCreateInstance failed to create the control.
- The control may not be properly installed or registered.
- The control may have missing dependencies.
- Only controls implemented as InProc servers (.DLL or .OCX) are supported.
One more scenario for this issue to happen is, suddenly your InfoPath form template's contact selector will show 'X' symbol.. kind of image not found. When you open the InfoPath form that has the contact selector control, it prompts the error some thing like, "Infopath cannot open this form, because some of the controls are not rendered'

Reason:
Office suit, particularly Infopath got corrupted.

Fix:
Run the Office Diagnostics tool.
1. Open InfoPath 2007


2. Help -> Office Diagnostics