跳到主要内容

如何合并多个文档并保持单词格式?

有时,当您使用Microsoft Word应用程序时,我们可能需要将多个文档合并为一个文档。 在Word中,可以使用以下一种棘手的方式将多个Word文档合并为一个:


使用从文件插入文本功能将多个文档合并为一个文档

您可以使用来将多个文档合并为一个文档 来自文件功能的文字 在Word中,但是这样做会导致合并后丢失文档的格式。

1。 创建一个新的Word文档,您将放置合并的文档,然后单击 插页 > 摆件 > 文件中的文字。 看截图:

2.请在打开的“插入文件”对话框中 (1) 打开包含要合并文档的文件夹; (2) 选择要合并的文档; 接着 (3) 点击 插页 按钮。 看截图:

Tips::控股 按Ctrl 键,您可以选择多个文档,一一点击; 保持 转移 键,可以通过单击第一个和最后一个选择多个相邻的文档。

3。 如果需要合并的文档保存在其他文件夹中,请根据需要在步骤1-2上方重复。

备注:您不能在合并的文件中订购文档,否则您将它们一个接一个地插入。

快速按指定顺序批量合并多个文件夹中的多个Word文档

Kutools for Word 发布了一个很棒的 合并 功能可帮助用户快速合并多个文件夹中的多个Word文档。 此功能不仅会在合并文件中保留原始文档的格式,还会按您指定的顺序合并文档。


广告合并文档对话框


使用VBA将多个文档合并为一个文档

或者,您可以使用VBA将多个文档合并到Word中。

1。 将所有要合并的Word文档移动到同一文件夹中。

2。 用一系列序列名称重命名Word文档。 (1) 右键单击文档,然后选择 重命名 从上下文菜单中,然后键入一个新名称,例如 Part1; (2) 重复以重命名其他文档。 看截图:

3。 双击打开您将放置在合并文件开头的文档。

4。 按 Alt + F11键 键一起打开Microsoft Visual Basic for Application窗口。

5。 点击 插页 > 模块,然后将以下VBA代码粘贴到新的“模块”窗口中;

VBA:在Word中合并多个文档

Sub MergeDocuments()
Application.ScreenUpdating = False
MyPath = ActiveDocument.Path
MyName = Dir(MyPath & "\" & "*.docx")
i = 0
Do While MyName <> ""
If MyName <> ActiveDocument.Name Then
Set wb = Documents.Open(MyPath & "\" & MyName)
Selection.WholeStory
Selection.Copy
Windows(1).Activate
Selection.EndKey Unit:=wdLine
Selection.TypeParagraph
Selection.Paste
i = i + 1
wb.Close False
End If
MyName = Dir
Loop
Application.ScreenUpdating = True
End Sub

备注:此VBA只能合并文件扩展名为docx的Word文档。 如果您需要合并文档(.doc),请替换 DOCX 在代码中 MyName = Dir(MyPath&“ \”&“ * .docx”) DOC.

6点击 运行 按钮或按下 F5 应用VBA的关键。

请注意: 您必须使用一系列序列名来重命名文档,否则文档可能会混乱或丢失在合并的文件中。


将多个文档合并为一个文档并使用 Kutools for Word 保持格式

安装后 Kutools for Word,则无需创建新的空白文档,也无需将文档放入同一文件夹中。 用 合并 使用Kutools,您可以快速将多个文档合并为一个单词。 请执行以下操作:

Kutools for Word 是一款终极 Word 插件,可简化您的工作并提高您的文档处理技能。 免费试用 60 天! 立即获取!

1。 点击 Kutools 加 > 合并。 看截图:
doc合并文件01

2.在打开的“合并文档”对话框中,请添加要合并的文档: (1) 点击 添加文件 按钮; (2) 在浏览对话框中,打开包含您要合并的文档的文件夹; (3) 保持 按Ctrl or 转移 选择这些文件的关键; 接着 (4) 点击 OK 按钮。 看截图:

Tips::
(1)如果您需要合并保存在其他文件夹中的文档,请重复此步骤以逐个添加它们;
(2)您还可以通过以下方式批量添加保存在一个文件夹中的所有文档: 添加文件夹 按钮。

3。 现在,您将返回“合并文档”对话框。 (1) 订购这些文件的方式 提前 下移 纽扣; (2) 文件间中断 下拉列表; 接着 (3) 点击 合并 按钮。 看截图:

现在,所有指定的Word文档都组合成一个新文档,如下图所示:
广告合并文档结果v8.9

请注意: 仅供参考,合并后的所有文档的原始格式都保留在合并结果中。

当然,您可以先打开所有Word文档,然后通过手动复制和粘贴合并它们。

分页浏览和编辑多个Word文档,例如Firefox,Chrome,Internet Explore 10!

您可能熟悉在 Firefox/Chrome/IE 中查看多个网页,并通过单击相应的选项卡轻松在它们之间切换。在这里,Office Tab支持类似的处理,它允许您在一个Word窗口中浏览多个Word文档,并通过单击它们的选项卡轻松地在它们之间切换。 单击可获得全部功能,免费试用!
使用Firefox在一个窗口中浏览多个Word文档


相关文章:

最佳办公生产力工具

Kutools for Word - 通过 Over 提升您的文字体验 100 显着特点!

🤖 Kutools 人工智能助手:用人工智能改变你的写作 - 生成内容  /  重写文本  /  总结文件  /  查询资料 基于文档,全部在Word中

📘 文档掌握: 分页  /  合并文件  /  以各种格式导出选择(PDF/TXT/DOC/HTML...)  /  批量转换为PDF  /  将页面导出为图像  /  一次打印多个文件...

内容编辑: 批量查找和替换 跨多个文件  /  调整所有图片的大小  /  转置表行和列  /  将表格转换为文字...

🧹 轻松清洁: 移开 多余的空间  /  分节符  /  所有标题  /  文本框  /  超链接  / 如需更多拆卸工具,请前往我们的 删除组...

创意插入: 插 千位分隔符  /  复选框  /  单选按钮  /  扫码支付  /  条码  /  对角线表  /  公式标题  /  图片说明  /  表标题  /  多张图片  / 发现更多 插入组...

🔍 精准选择:精确定位 特定页面  /    /  形状  /  标题段落  / 增强导航功能 更多 选择功能...

星级增强: 快速导航至任何位置  /  自动插入重复文本  /  在文档窗口之间无缝切换  /  11 转换工具...

👉 想尝试这些功能吗? Kutools for Word 提供了 60-day免费试用,没有任何限制! 🚀
 
Comments (21)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
When using the VBA code for merging multiple docx files, I got this debug error "Run-time error 5266. You can't paste this selection in a table" pointing at line "Selection.Paste" .Please help.

This comment was minimized by the moderator on the site
Dear Sir,
Can we track/identify the Content Control differences?
Thanks,
Hrishi
This comment was minimized by the moderator on the site
Does anyone know how I can build "HeadersFooters.LinkToPrevious (False)" into the VBA code?
This comment was minimized by the moderator on the site
Thank you so much Extend Office Team! Awesome tips! I can't describe how much your article helped me!
This comment was minimized by the moderator on the site
I read this article which is really helpful combine word documents
This comment was minimized by the moderator on the site
Thanks for sharing this.. VBA code is working for me.
This comment was minimized by the moderator on the site
Link exchange is nothing else but it is simply placing the other persons web site link on your page at proper place and other person will also do same for you. cbgedcededacebdd
This comment was minimized by the moderator on the site
Dear,
  • [i][b] I m vry fne to see ur steps or desgins. I get many knwlgde frm dis. For dis i thnk to very. I never forget[/i][/b]
This comment was minimized by the moderator on the site
VUA tor bap vua tor choddo gushthi vua totototototto
This comment was minimized by the moderator on the site
Does KUTOOL provides facility to merge two word files without changing format of each word file through C# or any language supported by .Net ?
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations