提示:其它语言是由 Google 机器翻译的。 你可以访问 English 版本。
登录
x
or
x
x
马上登记
x

or

如何合并多个文件并保持格式?

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

从文件插入文本功能逐个合并多个文档

用VBA批量合并多个文档

用Kutools for Word批量合并多个文档

逐一合并多个文件与复制和粘贴

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

Kutools为Word发布了一个梦幻般的 合并 功能来帮助用户从多个文件夹中快速合并多个Word文档。 该功能不仅可以在合并文件中保留原始文档的格式,还可以按照您指定的顺序合并文档。 点击60天免费试用!
广告合并文档对话框


箭头蓝色右泡 使用“从文件插入文本”功能将多个文档合并到一个文档中

您可以通过使用。将多个文档合并到一个文档中 来自文件功能的文本 在Word中,但通过这样做,合并后将丢失文档的格式。

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

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

小技巧:举行 按Ctrl 键,您可以选择多个文件并逐个点击; 保持 转移 键,您可以通过单击第一个和最后一个来选择多个相邻的文档。

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

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


箭头蓝色右泡 用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文档的能力。 45天免费试用! 现在得到它!

1。 点击 Kutools Plus > 合并。 看截图:
doc合并文档01

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

小技巧:
(1)如果您需要合并保存在其他文件夹中的文档,请重复此步骤逐一添加;
(2)您也可以通过添加所有保存在一个文件夹中的文件 添加文件夹 按钮。

3。 现在请返回到“合并文档”对话框 (1) 通过这些文件来订购 提前 下移 纽扣; (2) 指定文件之间的中断 打破文件之间 下拉列表; 接着 (3) 点击 合并 按钮。 看截图:

现在将所有指定的Word文档合并到一个新的文档中,如下所示:
广告合并文档结果v8.9

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

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

浏览和编辑多个Word文档为Firefox,Chrome,Internet浏览10!

您可能熟悉在Firefox / Chrome / IE中查看多个网页,并通过轻松点击相应的标签来切换它们。 在这里,Office选项卡支持类似的处理,允许您在一个Word窗口中浏览多个Word文档,并通过单击它们的选项卡轻松切换它们。 点击查看完整功能免费试用!
在一个窗口中以Firefox浏览多个单词文档


箭头蓝色右泡相关文章:




推荐的Word生产力工具

Kutools For Word - 超过100 Word的高级功能,节省您的50%时间

  • 复杂和重复的操作可以在几秒钟内完成一次性处理。
  • 一次将多个图像跨文件夹插入Word文档。
  • 将多个文件夹合并并组合成一个具有所需订单的文件。
  • 根据标题,分节符或其他标准将当前文档拆分为单独的文档。
  • 在Doc和Docx,Docx和PDF之间转换文件,用于常见转换和选择的工具集合等等......
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Hrishi · 1 years ago
    Dear Sir,
    Can we track/identify the Content Control differences?
    Thanks,
    Hrishi
  • To post as a guest, your comment is unpublished.
    Robert · 1 years ago
    Does anyone know how I can build "HeadersFooters.LinkToPrevious (False)" into the VBA code?
  • To post as a guest, your comment is unpublished.
    Corinne · 1 years ago
    Thank you so much Extend Office Team! Awesome tips! I can't describe how much your article helped me!
  • To post as a guest, your comment is unpublished.
    babji · 2 years ago
    I read this article which is really helpful
    combine word documents
  • To post as a guest, your comment is unpublished.
    kavitha · 2 years ago
    Thanks for sharing this.. VBA code is working for me.
  • To post as a guest, your comment is unpublished.
    Smithc507 · 3 years ago
    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
  • To post as a guest, your comment is unpublished.
    Bm Rami · 3 years ago
    Dear, [list][*][b][i][u][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[/b][/i][/u][/i][/b][/list]
  • To post as a guest, your comment is unpublished.
    sdfdfsvjkhdifbv sjkh · 3 years ago
    VUA
    tor bap vua
    tor choddo gushthi vua
    totototototto
  • To post as a guest, your comment is unpublished.
    satish · 4 years ago
    Does KUTOOL provides facility to merge two word files without changing format of each word file through C# or any language supported by .Net ?
  • To post as a guest, your comment is unpublished.
    Vasanthl · 4 years ago
    Macro works awesome. Merged 240 documents containing 2437 pgs without any issues. Formatting is maintained. As far as I saw, headers and footers are not merged, initial document header is maintained.

    Thank you!
  • To post as a guest, your comment is unpublished.
    N Rahd · 4 years ago
    This worked perfectly, it kept the original table format and was able to add a path to each file merged. Beautiful. Thanks!
  • To post as a guest, your comment is unpublished.
    Priyank · 5 years ago
    Thank you.

    This is what i was looking for. It was superb.

    :-)
  • To post as a guest, your comment is unpublished.
    Deepak · 5 years ago
    Anyone please help me to create a VBA macro for MS word to merge some part of multiple word document.
    Suppose a1.doc contain :

    a
    b
    c
    c
    e

    a2.doc contain:

    f
    g
    h
    i
    j

    i want to merge a1.doc and a2.doc so that the result will be below:

    d
    e
    i
    j
  • To post as a guest, your comment is unpublished.
    Mattusa · 5 years ago
    Thanks for the comments section. Otherwise I would have downloaded the software and wasted my time.
  • To post as a guest, your comment is unpublished.
    Elaine · 5 years ago
    Trying to merge word document with excel spreadsheet for salary administration. Therefore French & English formating is required. How to keep French formating in Word merged letter.

    French typo Engl Typo
    X XXX,XX $ $X,XXX.XX

    Thank you for your input
    Regards,
    Elaine
  • To post as a guest, your comment is unpublished.
    Iki · 5 years ago
    Thanks! This blog helped alot....Keep it up
  • To post as a guest, your comment is unpublished.
    Mandy Osburn · 5 years ago
    Hi,

    I tried this tool, but it did not keep the original formatting of my document and was no different than using the Insert/Object feature in Word. I followed the instructions above but it still did not work correctly.

    Thanks!
    Mandy
    • To post as a guest, your comment is unpublished.
      cindy · 5 years ago
      [quote name="Mandy Osburn"]Hi,

      I tried this tool, but it did not keep the original formatting of my document and was no different than using the Insert/Object feature in Word. I followed the instructions above but it still did not work correctly.

      Thanks!
      Mandy[/quote]
      yes, I had same result, and will not purchase!!
      • To post as a guest, your comment is unpublished.
        Brian · 4 years ago
        [quote name="cindy"][quote name="Mandy Osburn"]Hi,

        I tried this tool, but it did not keep the original formatting of my document and was no different than using the Insert/Object feature in Word. I followed the instructions above but it still did not work correctly.

        Thanks!
        Mandy[/quote]
        yes, I had same result, and will not purchase!![/quote]

        Gee I wish I had read these comments BEFORE I downloaded this program. I have found the same problems. The program changes the page format, and will not allow the merge of documents that have headers and footers. How do I get rid of this program now?
        • To post as a guest, your comment is unpublished.
          Brian · 4 years ago
          In the above mentioned comment, i was actually referring to the KUTOOLS for WORD program. I have not attempted the VBA suggestion, as I am not an Administrator to my work computer, I therefore did not feel safe enough to trial it.
          Maybe someone else can give feed back as to whether headers and footers can be merged into other documents without losing their format.