Skip to content

C # using the word to open the document is too slow

jiangwei jiangwei

Asked May 6, 2008, 5:20 PM EDT1 answer
Share
LinkedInX
Hi,
     When I open Word using C #, too slow, would have quickly open the Word function »

C # code is as follows:

  Microsoft.Office.Interop.Word.Application wor = new         Microsoft.Office.Interop.Word.ApplicationClass();
            Microsoft.Office.Interop.Word.Document doc = null ;
            try
            {
                Console.WriteLine("open file : " + fileFullPath);
               
                doc = wor.Documents.Open(
                ref fileFullPath,
                ref confirmConversion,
                ref readOnly,
                ref addtoRecentFiles,
                ref missing,
                ref missing,
                ref missing,
                ref missing,
                ref missing,
                ref missing,
                ref missing,
                ref missing,
                ref missing,
                ref missing,
                ref missing,
                ref missing);
         ........................
               

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Bechir Bejaoui
    0
    Why you didn't this asynchrounously I mean you use BeginInvoke() and EndEnvoque() it is better
    0