Здравствуйте, piranha, Вы писали:
P>При исполнении вот такого вот когда:
P>P>ApplicationClass wordapp = new ApplicationClass();
P>Document worddoc;
P>OpenFileDialog of = new OpenFileDialog();
P>if (of.ShowDialog() == DialogResult.OK)
P>{
P> object fileName = of.FileName;
P> worddoc = wordapp.Documents.Open(ref fileName, ref missing, ref missing, ref missing,
P> ref missing, ref missing, ref missing, ref missing, ref missing, ref missing,
P> ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
P>}
P>
P>У меня выскакивает такая ошибка:
P>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)).
P>Что делать, куда копать?
ApplicationClass wordapp = new ApplicationClass(); -> Application wordapp = new Application();