Word Interop Application casting error

Discussion in 'Windows Vista General Discussion' started by EruditeBonnie, Nov 30, 2007.

  1. I have a Windows app that uses the Primary Interop Assemblies for Word. It
    runs just fine on XP machines. It does not on Vista. The Vista machine is
    running Word 2003, so I installed the O2003PIA assemblies. However, I get
    the following error when trying to access Word:

    Unable to cast COM object of type
    ‘Microsoft.Office.Interop.Word.ApplicationClass’ to interface type
    ‘Microsoft.Office.Interop.Word._Application’. This operation failed because
    the QueryInterface call on the COM component for the interface with IID
    ‘{00020970-0000-0000-C0000-000000000046}’ failed due to the following error:
    No such interface supported (Exception from HRESULT: 0x80004002

    I am defining my word application object like this:
    Word.Application _wordApp = new Word.Application();

    I've also tried:
    Word._Application _wordApp = new Word.Application(); //can't instantiate a
    _Application object)

    Both give me the same error.

    Is there something special I have to do for Vista?

    EruditeBonnie, Nov 30, 2007
    1. Advertisements

  2. You probably should post this in the following ng for more expert answers:
    Andre Da Costa[ActiveWin], Nov 30, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.