添加内容控件的代码 Word 2007 C#
我想知道是否有人知道如何通过 C# 从文档任务/操作窗格将内容控件添加到 Word 文档 (Office 2007)。目标如下:
我希望在任务/操作窗格中对信息进行分类,并让用户在那里填写信息。一旦他们填写了该信息,他们将单击一个按钮,它将内容控件插入到具有该数据的 Word 文档中。
我想使用内容控件的原因是因为数据将绑定到数据库。
这可能吗?我想要无需 WordProcessingML 或 OpenXML 即可执行此操作的链接。必须有一种方法可以通过服务器端代码来完成此操作,并且不需要长块,等等。
谢谢!
I was wondering if anyone has any idea how I can add Content Controls to a Word Document (Office 2007) from the Document Task/Action Pane via C#. The goal is the following:
I want to have categorized information in the Task/Action Pane and have the user fill out the info there. Once they have filled out that information they'll click on a button and it will insert content Controls into the Word Document that has that Data.
The reason I want to use Content Controls is because the data will be bound to a database.
Is this possible? I would like links that do this without WordProcessingML or OpenXML. There has to be a way to do this via server side code and such that doesn't require long blocks of ,, etc.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是关于这个主题的很棒的文章。
通过 Open XML 填充 Word 2007 模板
this is great article on the subject.
Populating Word 2007 Templates Through Open XML