Word Interop
От: piranha Украина  
Дата: 30.05.06 21:22
Оценка:
При исполнении вот такого вот когда:

ApplicationClass wordapp = new ApplicationClass();
Document worddoc;
OpenFileDialog of = new OpenFileDialog();

if (of.ShowDialog() == DialogResult.OK)
{
    object fileName = of.FileName;
    worddoc = wordapp.Documents.Open(ref fileName, ref missing, ref missing, ref missing,
        ref missing, ref missing, ref missing, ref missing, ref missing, ref missing,
        ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
}


У меня выскакивает такая ошибка:

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-C000-000000000046}' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).

Что делать, куда копать?
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.