How to save doc file using C#

前端 未结 3 1356
别那么骄傲
别那么骄傲 2020-12-11 11:16

I have been using the following to code to write in word file but not able to store the word file. Is there any way to store the word file using C# ?

object          


        
3条回答
  •  北荒
    北荒 (楼主)
    2020-12-11 11:40

    Try this:

    var FileName = 'file name with path'
    
        oWord.ActiveDocument.SaveAs(ref FileName, ref missing,
                            ref missing, ref missing, ref missing,
                            ref missing, ref missing, ref missing,
                            ref missing, ref missing, ref missing,
                            ref missing, ref missing, ref missing,
                            ref missing, ref missing);
        oDoc.Close(ref missing, ref missing, ref missing);
    

提交回复
热议问题