0
从WordprocessingDocument如何检查单词文档是否为空?如何检查WordprocessingDocument是否为空?
从WordprocessingDocument如何检查单词文档是否为空?如何检查WordprocessingDocument是否为空?
根据样本文档在这里:
http://msdn.microsoft.com/en-us/library/office/bb521237(v=office.14).aspx
可以从WordprocessingDocument
获取ExtendedFilePropertiesPart
,与GetElementsByTagName("Characters")
取“字符”属性,如果该值是零,可能是一个很好的指标该文档是空的,不管其他格式是否存在。
查看上面的链接并滚动到页面底部查看完整的源代码。
您的问题不是很具体。你什么意思是空的? – 2009-02-20 19:07:03