加入 MS Word 文档

发布于 2024-07-14 09:24:58 字数 63 浏览 5 评论 0原文

在代码中将一组 MS Word 文档拼接成一个的建议策略是什么?

干杯

尼克

What is the recommended strategy for in code to splice a set of MS Word documents together into one?

Cheers

Nik

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

谁对谁错谁最难过 2024-07-21 09:24:58

去看看各种可用的 SDK。 如果您使用的是 Word 2007,这会更容易,因为该文件实际上是包含各种 XML 文档的 zip 文件。 MS 甚至有一个名为“Open XML Format SDK 1.0”,它提供了用于处理新办公格式的强类型类。

Go look at the various SDKs available. This is much easier to do if you are using Word 2007, as the file is actually a zip file containing various XML documents. MS even has an SDK called "Open XML Format SDK 1.0" which provides strongly typed classes for working with the new office format.

穿透光 2024-07-21 09:24:58

如果您使用 Open XML(即 docx),有 2 个基本的
解决这个问题的方法:

首先是做必要的事情,让 ids 指向正确的
关系(例如图像、超链接)和样式定义等。
您可以在以下位置找到有关您需要做什么的详细解释
http://blogs.msdn.com/ericwhite/archive/2009/02/05/move-insert-delete-paragraphs-in-word-processing-documents-using-the- open-xml-sdk.aspx

PowerTools 实现了这一点。

第二种是使用altChunk:
http: //blogs.msdn.com/ericwhite/archive/2008/10/27/how-to-use-altchunk-for-document- assembly.aspx

If you are using Open XML (ie docx), there are 2 basic
approaches to solving this problem:

The first is to do what is necessary so ids point to the correct
relationship (eg for images, hyperlinks), and styles are defined etc. A
good explanation of what you need to do can be found at
http://blogs.msdn.com/ericwhite/archive/2009/02/05/move-insert-delete-paragraphs-in-word-processing-documents-using-the-open-xml-sdk.aspx

PowerTools implements that.

The second is to use altChunk:
http://blogs.msdn.com/ericwhite/archive/2008/10/27/how-to-use-altchunk-for-document-assembly.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文