提示:其他語言是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文檔的能力。 60天免費試用! 現在得到它!

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 · 2 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 · 3 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 · 4 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 · 5 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 · 5 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 · 6 years ago
    Thanks! This blog helped alot....Keep it up
  • To post as a guest, your comment is unpublished.
    Mandy Osburn · 6 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 · 5 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 · 5 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.