COM class factory Error in Microsoft.Office.Interop

1

I get this Error in c# code:

Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).

This is my code:

Microsoft.Office.Interop.Word.Application word = new Microsoft.Office.Interop.Word.Application();
                            object miss = System.Reflection.Missing.Value;
                            object readOnly = true;
                            Microsoft.Office.Interop.Word.Document docs = word.Documents.Open("myUrl", ref miss, ref readOnly, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss);
                            string totaltext = "";
                            for (int i = 0; i < docs.Paragraphs.Count; i++)
                            {
                                totaltext += " \r\n " + docs.Paragraphs[i + 1].Range.Text.ToString();
                            }
c#
asp.net-mvc
asked on Stack Overflow Aug 26, 2019 by Afshin Rashidi • edited Aug 26, 2019 by A. Nadjar

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0