Open and modify Word Document

后端 未结 3 1786
被撕碎了的回忆
被撕碎了的回忆 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:56

    You need to make sure that the Word application window actually is made visible when automating Word like that:

    var applicationWord = new Microsoft.Office.Interop.Word.Application();
    applicationWord.Visible = true;
    

提交回复
热议问题