Using VBE extension libaray in Excel 2007 C# project RRS feed

  • Question




    i will try this code for excel2007 but give me error like this: for line

    VBIDE.VBComponent oModule;

    oModule = oBook.VBProject.VBComponents.Add(VBIDE.vbext_ComponentType.vbext_ct_StdModule);


    Error   :    Namespace '<global namespace>' contains a definition conflicting with alias 'VBIDE'  

    plz any one can help me.

    thank u


    • Edited by Cindy Meister MVP Thursday, May 19, 2011 12:24 PM More meaningful subject line
    Thursday, May 19, 2011 11:26 AM


  • Hi Tusharlj

    I've edited the subject line of your message so that more people can understand what your question is about...

    Could you show us the "using" statements at the top of your project, please?

    Does the error message go away if you fully qualify the calls, rather than use an alias?

    Cindy Meister, VSTO/Word MVP
    • Proposed as answer by Bruce Song Wednesday, May 25, 2011 6:48 AM
    • Marked as answer by Bruce Song Tuesday, May 31, 2011 10:20 AM
    Thursday, May 19, 2011 12:26 PM