Error while executing WebBrowserControlWindow() function RRS feed

  • Question

  • Hi,

    I am working on creating Addin for MS Project 2010 using Visual Studio 2010. I am creating Project Guide and document pane using HTML. I am using Application variable to access object model of the MS Project 2010. I am using function WebBrowserControlWindow to get access to the current webbrowser control being used in the Project guide and for this I am writing following statement :

       Dim RightDoc_1 As mshtml.IHTMLDocument2

       Dim hw As mshtml.HTMLWindow2


       RightDoc_1 = Application.Windows2.ActiveWindow.WebBrowserControlWindow()

       hw = DirectCast(RightDoc_1.frames.item(1), mshtml.HTMLWindow2)


    But while executing the statement  Application.Windows2.ActiveWindow.WebBrowserControlWindow(),  I am getting following error

    Reference required to assembly 'Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' containing the type 'mshtml.IHTMLDocument2'. Add one to your project.”

    I have already added reference to the the required dll of the same version.

    Any suggestion and help will be appreciated.

    Friday, January 28, 2011 1:36 PM

All replies

  • Hi sweetie123,

    Could it be that your application is 32bit and your OS is 64bit (or visa versa)?

    You might have referenced the wrong version of the dll in this case (or maybe the correct dell even is not registered).


    My EPM blog: Projectopolis
    Friday, January 28, 2011 3:59 PM