跳到主要內容

如何刪除Word中的所有頁眉和頁腳?

通常,只需雙擊頁眉或頁腳字段,然後一次將它們刪除,就可以快速刪除Word文檔中的所有頁眉和頁腳。 但是,如果一個文檔中有多個不同的頁眉和頁腳,那麼如何一次將其全部刪除呢?


從活動文檔的第一頁中刪除頁眉和頁腳

如果您只想從當前文檔的第一頁中刪除頁眉和頁腳並保留其他內容,請執行以下操作:

1。 打開Word文件並轉到要刪除頁眉和頁腳的第一頁,然後雙擊頁眉區域進入編輯模式。

2。 然後檢查 不同的首頁頁眉頁腳 標籤,請參見屏幕截圖:

3。 然後,單擊 關閉頁眉和頁腳 退出編輯模式,並且第一頁的標題內容已被立即刪除。 看截圖:

文檔箭頭

保養竅門:要從首頁刪除頁腳,請重複上述步驟。


刪除活動文檔中的所有頁眉和頁腳

如果整個文檔僅包含一種類型的頁眉和頁腳,要刪除所有這些頁眉和頁腳,以下步驟可幫助您快速輕鬆地解決它。

1。 雙擊任一頁面中的標題以進入編輯模式,然後選擇標題的內容,請參見屏幕截圖:

2。 然後按 刪除 鍵盤上的鍵,然後單擊 關閉頁眉和頁腳 要退出編輯模式,該當前文檔中的所有標題都已被立即刪除。

保養竅門:要從本文檔中刪除所有頁腳,請重複上述步驟。


使用VBA代碼刪除活動文檔中的所有各種頁眉和頁腳

假設您的文檔已分為多個部分,每個部分都有每個頁眉或頁腳。 因此,活動文檔中有多個各種頁眉或頁腳,要刪除所有這些各種頁眉或頁腳,您需要應用上述方法一遍又一遍地刪除頁眉或頁腳。 在這裡,我將介紹用於處理此任務的VBA代碼。

1。 打開您要刪除所有頁眉和頁腳的Word文件,然後按住 ALT + F11 鍵打開 Microsoft Visual Basic for Applications 窗口。

2。 點擊 插入 > 模塊,然後將以下宏粘貼到“模塊窗口”中。

VBA代碼:刪除當前文檔中的所有各種頁眉和頁腳:

Sub RemoveHeadAndFoot()
'Update by Extendoffice
    Dim oSec As Section
    Dim oHead As HeaderFooter
    Dim oFoot As HeaderFooter
    For Each oSec In ActiveDocument.Sections
        For Each oHead In oSec.Headers
            If oHead.Exists Then oHead.Range.Delete
        Next oHead
        For Each oFoot In oSec.Footers
            If oFoot.Exists Then oFoot.Range.Delete
        Next oFoot
    Next oSec
     Selection.WholeStory
    ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
    Selection.ParagraphFormat.Borders(wdBorderBottom).LineStyle = wdLineStyleNone
    ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub

3。 然後按 F5 要運行此代碼,請立即刪除所有各種頁眉和頁腳。


Office選項卡-將選項卡式界面帶到Office,使您的工作更加輕鬆!

Office Tab:在查看和編輯多個文檔時,可將您的工作效率提高50%,有助於減少數千次乏味的鼠標單擊,並在30天免費試用! 點擊免費試用!


使用“檢查文檔”功能刪除活動文檔中的所有各種頁眉,頁腳和水印

如果您不熟悉VBA代碼,也可以使用 檢查文件 Word的功能可輕鬆刪除所有頁眉和頁腳。 請執行以下步驟:

1。 點擊 文件 > 聯繫我們 > 檢查問題 > 檢查文件,請參見屏幕截圖:

2。 在彈出的 文件檢查員 對話框中,僅選中 頁眉,頁腳和水印 對話框中的“選項”,請確保未選中其他選項。 看截圖:

3。 然後,點擊 檢查 按鈕,在檢查文檔後,單擊 全部刪除 按鈕在對話框中,請參見屏幕截圖:

4。 然後,點擊 關閉 按鈕,所有頁眉,頁腳以及水印已從整個文檔中刪除。

備註:如果文檔中有水印,它們也會被刪除。


刪除功能中具有驚人功能的所有標題行

有時,您只想刪除標題內容下的水平線,在這種情況下,我將介紹一個使用工具-Kutools for Word,其 清除標題行 功能,只需單擊一下即可從標題中刪除所有水平標題行。

要使用此功能,請 下載並安裝Kutools for Word 首先!

下載並安裝後 Kutools for Word,請這樣做:

1。 點擊 庫工具 > 清除 > 清除標題行,請參見屏幕截圖:

2。 然後彈出一個提示框,請點擊 按鈕,請參見屏幕截圖:

3。 並且標題下的所有水平標題行都已被立即刪除。

文檔箭頭

更多相關的頁眉和頁腳文章:

  • 將章節標題添加到Word文檔的頁眉或頁腳
  • 通常,您可以在Word文件中快速輕鬆地插入帶有文檔路徑,名稱的頁眉或頁腳。 但是,您是否嘗試過將章節標題插入頁眉或頁腳,以便頁眉或頁腳的內容取決於頁面所在的章節。本文將討論如何在Word中解決此工作文件。
  • 打印沒有頁眉和頁腳的Word文檔
  • 如果您的Word文檔中有頁眉和頁腳,則在打印此文檔時,默認情況下也會打印頁眉和頁腳。 但是,有時候,不需要打印頁眉和頁腳。 在這種情況下,本文中的方法可能會對您有所幫助。
  • 在Word文檔中創建多個頁眉或頁腳
  • 默認情況下,插入的頁眉或頁腳將應用於Word文檔中的所有頁面。 如果要在Word文檔中創建不同的頁眉或頁腳,本文中的方法可以為您提供幫助。
  • 複製頁面中的頁眉和頁腳
  • 通常,您可以輕鬆地將頁面從一個Word文檔複製到另一個。 但是,頁面頁眉和頁腳不會與頁面內容同時復制。 與手動複製頁眉和頁腳相比,本文將介紹一種在Word中復制頁眉和頁腳的棘手方法。

最佳辦公生產力工具

Kutools for Word - 透過 Over 提升您的文字體驗 100 顯著特點!

🤖 Kutools 人工智慧助手:用人工智慧改變你的寫作 - 生成內容  /  重寫文字  /  總結文件  /  查詢資料 基於文檔,全部在Word中

📘 文件掌握: 分頁  /  合併文件  /  以各種格式匯出選擇(PDF/TXT/DOC/HTML...)  /  批次轉換為PDF  /  將頁面匯出為圖像  /  一次列印多個文件...

內容編輯: 批量查找和替換 跨多個文件  /  調整所有圖片的大小  /  轉置表行和列  /  將表格轉換為文字...

🧹 輕鬆清潔: 移開 多餘的空間  /  分節符  /  所有標題  /  文本框  /  超鏈接  / 如需更多拆卸工具,請前往我們的 刪除組...

創意插入: 插入 千位分隔符  /  複選框  /  單選按鈕  /  QR Code  /  條碼  /  對角線表  /  公式標題  /  圖片說明  /  表格標題  /  多張圖片  / 發現更多 插入組...

🔍 精準選擇:精確定位 特定頁面  /    /  形狀  /  標題段落  / 增強導航功能 更多 選擇功能...

星級增強: 快速導航至任何位置  /  自動插入重複文字  /  在文檔視窗之間無縫切換  /  11 轉換工具...

???? 想嘗試這些功能嗎? Kutools for Word 提供了 60天免費試用,沒有任何限制! 🚀
 
Comments (17)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
Why do you make it so difficult. All I am trying to do is number the pages of a word document, but unwanted header and footers positions are inserted. The back button refused to work. Why can't I just press the back button to remove these unwanted header and footer positions?
This comment was minimized by the moderator on the site
Спасибо, с макросом получилось быстро!
Rated 5 out of 5
This comment was minimized by the moderator on the site
method 3 did not work for me....
This comment was minimized by the moderator on the site
Thank you. Work requires us to add a footer and header, which completes screws up my labels.
This comment was minimized by the moderator on the site
Thank you so much. This has saved me, method 3 is so perfect. BLESS
This comment was minimized by the moderator on the site
Thanks.
I have Word 2013 and access to Word Professional 2019.
I am using word files which has over 200 sections. There are multiple files
It is cumbersome to go and delete each section Header & footer.
The code given by you remove header and footer content but the section frames remain.
How to remove all section frames? Pl suggest.

I have tried :
1. Goto Insert - Header/Footer and remover Header/Footer. But it works for each section. - Too cumbersome if I have over 200 sections.
2. I tried editing header & footer but again it works per section only.
3. I tried Inspection option also. But it corrupts the Header & footers but frames remains.

Now Please suggest any other method to remove all section Header & footers
This comment was minimized by the moderator on the site
This does not work. It deletes the text in the footers and headers, but does not remove the formatting itself. I use Google Docs in my personal life and Microsoft Office at work. I gave up on Office a long time ago because of BS like this. It shouldn't be this difficult to use. I'm going to have to rewrite the entire 42-page document. I will get done sooner doing that than I will trying to undo Microsoft's formatting.
This comment was minimized by the moderator on the site
I have so many problems with office, to be honest it works horrible and other programs work way better than this, the also dont want you to get a subscription to use there horrible programs with high prices. I'll rate it a 3/10, I hope they fix their shit and more big problems like this one
This comment was minimized by the moderator on the site
Thanks a lot, headers and footers has been a headache for me.
This comment was minimized by the moderator on the site
not worked
This comment was minimized by the moderator on the site
Method 3 Solved my problem!! Thank you so much! : )
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