How to programatically tell if a word document is corrupt?

前端 未结 2 905
梦谈多话
梦谈多话 2021-01-14 14:19

I\'ve got a little C# application that interops with word converting a bunch of word .doc files into textfiles and for the most part this works fine.

However, if the

2条回答
  •  灰色年华
    2021-01-14 14:46

    Depending on the nature of your application, if it's a server side application without UI interaction, using Office automation may have issues. (see link here: http://support.microsoft.com/kb/257757)

    If it's Office 2007+, the best way is to use OpenXML. If it's older files, then some 3rd party tools may be used, for example, aspose API

提交回复
热议问题