将 2x DOCX 文件合并为 1 个?
我需要以编程方式合并一大堆 docx 文件。 想象一下它们的编号为 1 到 10。我本质上需要一个包含所有 10 个文档的 Final.docx 文件。 如果我可以以某种方式将第二个附加到第一个,那么我可以对第三个、第四个等重复它。
请注意,我不需要重建目录或类似的内容。 每个 docx 中都只有一些静态内容。 然而,这些文档上有页脚,需要保留它们。
最好是 C# 或 MSBuild 的答案。
感谢您。
I need to merge a whole bunch of docx files programatically. Imagine they are numbered 1 to 10. I essentially need a final.docx file that contains all 10 documents in it.
If I can append the second to the first somehow, then I can repeat it for the third, then fourth, etc.
Note that I do NOT need to rebuild a table of contents or anything like that. Each docx just has some static content in it. However there ARE footers on these documents, and they need to be preserved.
Preferably an answer in C# or MSBuild.
Thanking you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我用 C# 创建了一个应用程序,将 RTF 文件合并到一个文档中,我希望它也适用于 DOC 和 DOCX 文件。
希望这可以帮助!
I had made an application in C# to merge RTF files into one doc,Iam hopeful it should work for DOC and DOCX files as well.
Hope this helps!
使用 Open XML Power Tools,如 http://blogs.msdn.com/b/ericwhite/archive/2009/02/05/move-insert-delete-paragraphs-in -word-processing-documents-using-the-open-xml-sdk.aspx
Use Open XML Power Tools, described at http://blogs.msdn.com/b/ericwhite/archive/2009/02/05/move-insert-delete-paragraphs-in-word-processing-documents-using-the-open-xml-sdk.aspx