none
Using C# ActiveX control with Word, Excel and VC++ RRS feed

  • Question

  • Hi,

    I have created an ActiveX class library with Usercontrol. Created Setup Project and cab file. I could get the control in the Internet Explorer.

    and able to insert the control in an VC++ application using "Insert ActiveX object" option. But I need to use the same control in Word2007

    and Excel2007. Using Regasm I have rigstered the dll manually then I could see the control listed in the "Insert activeControl" option under

    developer ribbon control. While inserting i am getting message like, "the control is not registered or not installed properly" and in excel,

    "Cannot insert object". Please help me to resolve this issue.

    • Moved by CoolDadTx Friday, May 11, 2012 12:22 PM Office related (From:Visual C# General)
    Friday, May 11, 2012 11:37 AM

Answers

  • Hi Etios

    I can't help you at a deep, detailed level, but I may be able to get you looking in the right place...

    Office doesn't support ActiveX as "ActiveX" - it requires some special settings when the ActiveX is created and compiled. I know this because I read it somewhere, a couple of years ago. "Somewhere" would be in one of the Office forums here on MSDN, probably "Visual Studio Tools for Office", back when the VSTO team supported the forums.

    If you search that forum on "ActiveX" you should turn up the one or two discussions on the topic, as the MS person who dealt with the topic did provide detailed information required to "build" an ActiveX control that can be loaded into an Office document. (That's what the VSTO team did to provide support for embedding WinForms and UserControls into Word and Excel.)


    Cindy Meister, VSTO/Word MVP

    Sunday, May 13, 2012 6:56 AM
    Moderator