开发者

Opening Dot File with OpenXML

I need to work on opening a DOT (word document template) file, replace the fillers and save it as Document file.

On opening DOT file I am getting开发者_开发百科 "Document File is Corrupted".

Is it possible to work with DOT file using OpenXML.

UPDATE: I am saving DOT file as XML (manually using "Save as.."). Renaming file back to dot, so it is XML file built on WordML. Still trying to open it through OpenXML giving me the same error.


OpenXML is used in the new formats of Office 2007 (.dotx and .docx). WordML is a bit older and cannot be used with the OpenXML libraries.

You can load a WordML file as an XmlDocument or load it into a string if you know exactly what data you want to replace.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜