跳到主要内容

如何删除Word中的所有页眉和页脚?

通常,只需双击页眉或页脚字段,然后一次将它们删除,即可快速从Word文档中删除所有页眉和页脚。 但是,如果一个文档中有多个不同的页眉和页脚,那么如何一次将其全部删除呢?


从活动文档的第一页中删除页眉和页脚

如果您只想从当前文档的第一页中删除页眉和页脚并保留其他内容,请执行以下操作:

1。 打开Word文件,然后转到要删除页眉和页脚的第一页,然后双击页眉区域,进入编辑模式。

2。 然后检查 不同的首页 在下面 页眉页脚 标签,请参见屏幕截图:

3。 然后,单击 关闭页眉和页脚 退出编辑模式,并且第一页的标题内容已被立即删除。 看截图:

文档箭头

Tips:要从首页删除页脚,请重复上述步骤。


删除活动文档中的所有页眉和页脚

如果整个文档仅包含一种类型的页眉和页脚,要删除所有这些页眉和页脚,以下步骤可帮助您快速轻松地解决它。

1。 双击任一页面中的标题以进入编辑模式,然后选择标题的内容,请参见屏幕截图:

2。 然后按 删除 键盘上的键,然后单击 关闭页眉和页脚 要退出编辑模式,该当前文档中的所有标题都已被立即删除。

Tips:要从本文档中删除所有页脚,请重复上述步骤。


使用VBA代码删除活动文档中的所有各种页眉和页脚

假设您的文档已分为多个部分,每个部分都有每个页眉或页脚。 因此,活动文档中有多个各种页眉或页脚,要删除所有这些各种页眉或页脚,您需要应用上述方法一遍又一遍地删除页眉或页脚。 在这里,我将介绍用于处理此任务的VBA代码。

1。 打开您要删除所有页眉和页脚的Word文件,然后按住 ALT + F11 键打开 Microsoft Visual Basic应用程序 窗口。

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 Tab - 将选项卡式界面引入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文档复制到另一个。 但是,页面页眉和页脚不会与页面内容同时复制。 与手动复制页眉和页脚相比,本文将介绍一种在Word中复制页眉和页脚的棘手方法。

最佳办公生产力工具

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

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

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

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

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

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

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

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

👉 想尝试这些功能吗? Kutools for Word 提供了 60-day免费试用,没有任何限制! 🚀
 
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