如何从使用WinForm / C#动态创建的模板中保存Word文档 [英] How to save a Word Document from a template that has been created dynamcially using WinForm/C#

查看:683
本文介绍了如何从使用WinForm / C#动态创建的模板中保存Word文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个动态Word文档模板,该模板在运行时显示SQL  Server中的数据。运行应用程序并显示Word文档后,我想保存文档。但是,我不能这样做。有一个选项,我可以
将其保存为pdf文件,但我的用户希望保存Word文档,以便他们可以对文档进行更改。


请帮忙!


提前谢谢你 

解决方案

您好Tim


您需要提供更多信息。既然您在Open XML SDK论坛中发帖,我假设您正在使用它来创建Word文档模板?您能否更具体地了解文件类型,请问:扩展名是什么?它是docx,dotx,还是
else?


Word文档在哪里"显示"?请告诉我们代码的一部分,以便我们能够完全理解它正在做什么。


请描述您在尝试保存文档时使用的菜单命令。


I have created a dynamic Word document template that displays data from SQL Server at run-time. After running the application and the Word document shows up, I want to save the document. However, I can NOT do that. There is an option that I can save it as pdf file, but my users want to save the Word document so they can make changes on the document.

Please help!

Thank you in advance 

解决方案

Hi Tim

You need to provide more information. Since you're posting in the Open XML SDK forum I assume you're using that to create the Word document template? Could you be more specific about the file type, please: what's the extension? Is it docx, dotx, something else?

Where is the Word document "showing up"? Please show us that part of the code so that we can understand what it's doing, exactly.

Please describe the menu commands you use when you try to save the document.


这篇关于如何从使用WinForm / C#动态创建的模板中保存Word文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆