问题描述
我有一个Word Addin打开一个Windows窗体。在提交表单时,它将创建一个XML。我想保存与XML文档同名的单词。该名称将具有GUID。我想首先保存XML然后单词。
保存格式 - >
< aaa> _< doctype> _< guid> .xml
< aaa> _< doctype> _< guid> .docx
aaa = companycode(数据在Windows窗体中可用),
doctype = doc的文档类型(数据以windows格式提供),
请指教..
我尝试过:
成功保存XML。
I have a Word Addin which opens a Windows Form. On submitting the form it will create a XML. I want to save the word with the same name as the XML document. The name will have a GUID. I want to save the XML first then the word.
Save Format ->
<aaa>_<doctype>_<guid>.xml
<aaa>_<doctype>_<guid>.docx
aaa=companycode (data is available in the windows form),
doctype=document type of the doc(data is available in the windows form),
Please advise..
What I have tried:
Successfully able to save the XML.
推荐答案
string documentFileName = Path.ChangeExtension(xmlFileName, ".docx");
这篇关于如何从添加的Windows窗体中保存word文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!