Open and modify Word Document

后端 未结 3 1793
被撕碎了的回忆
被撕碎了的回忆 2020-12-05 19:26

I want to open a word file saved in my server using \"Microsoft.Office.Interop.Word\". This is my code:

    object missing = System.Reflection.Missing.Value;         


        
3条回答
  •  没有蜡笔的小新
    2020-12-05 19:41

    http://support.microsoft.com/kb/257757

    Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.

    http://freeword.codeplex.com/

    Document document = new Document();
    document.LoadFromFile("test.doct");
    

提交回复
热议问题