收藏 分销(赏)

怎么在word中批量删除页眉和页脚.doc

上传人:人****来 文档编号:4542599 上传时间:2024-09-27 格式:DOC 页数:5 大小:94.04KB 下载积分:6 金币
下载 相关 举报
怎么在word中批量删除页眉和页脚.doc_第1页
第1页 / 共5页
怎么在word中批量删除页眉和页脚.doc_第2页
第2页 / 共5页


点击查看更多>>
资源描述
怎么在word中批量删除页眉与页脚  在日常工作中,我们有时会碰到一大堆文件需要批量删除页眉与页脚,如果一个个打开文件手工删除得话,会很耗时间精力,下面小编就教您怎么在word中批量删除页眉与页脚、   word中批量删除页眉与页脚得步骤:   首先,我先制作一个测试文件夹,里面包含几个word文档,都有页眉—-百度经验这四个字,当然其她得文字也行,只就是一个测试; 下面我们需要打开宏,03版得宏不需要去开启开发工具,只需要点击菜单栏中得工具-宏-宏;   进入宏对话框,我们可以在宏名随便输入英文字母,在右侧点击一下创建; 接着,进入了宏代码编写框,将下面代码复制进来: Sub 批量删除页眉页脚() Application、ScreenUpdating = False   Dim MyPath As String, i As Integer, myDoc As Document   With Application、(mso) 、Title = "选择要处理目标文件夹” & "—-(删除里面所有Word文档得页眉页脚)”   If 、Show = —1 Then  MyPath = 、SelectedItems(1) Else   Exit Sub  End If  End With   With Application、   、LookIn = MyPath  、 = mso   If 、Execute > 0 Then   For i = 1 To 、Found Set myDoc = Documents、Open((i)) ' B可以替换得宏  ' 以下就是处理格式所录制得宏,可根据所需录制   If ActiveWindow、View、SplitSpecial 〈> wdPaneNone Then  ActiveWindow、Panes(2)、Close   End If   If ActiveWindow、ActivePane、View、Type = wdNormalView Or ActiveWindow、 _  ActivePane、View、Type = wdOutlineView Then   ActiveWindow、ActivePane、View、Type = wdPrintView   End If   ActiveWindow、ActivePane、View、SeekView = wdSeekCurrentPageHeader   Selection、WholeStory   Selection、Delete Unit:=wdCharacter, Count:=1  Selection、WholeStory   With Selection、ParagraphFormat 、Borders(wdBorderLeft)、LineStyle = wdLineStyleNone 、Borders(wdBorderRight)、LineStyle = wdLineStyleNone   、Borders(wdBorderTop)、LineStyle = wdLineStyleNone   、Borders(wdBorderBottom)、LineStyle = wdLineStyleNone   With 、Borders 、DistanceFromTop = 1   、DistanceFromLeft = 4  、DistanceFromBottom = 1   、DistanceFromRight = 4   、Shadow = False  End With   End With  With Options   、DefaultBorderLineStyle = wdLineStyleSingle  、DefaultBorderLineWidth = wdLineWidth075pt   、DefaultBorderColor = wdColorAutomatic End With  If Selection、HeaderFooter、IsHeader = True Then ActiveWindow、ActivePane、View、SeekView = wdSeekCurrentPageFooter  Else   ActiveWindow、ActivePane、View、SeekView = wdSeekCurrentPageHeader End If   Selection、WholeStory   Selection、Delete Unit:=wdCharacter, Count:=1 ActiveWindow、ActivePane、View、SeekView = wdSeekMainDocument Selection、Sections(1)、Footers(1)、PageNumbers、Add PageNumberAlignment:= _   wdAlignPageNumberRight, FirstPage:=True   ’ 以上可以换成就是您自己录制得宏 ' C公共部分得代码  Application、DisplayAlerts = False ’强制执行“就是”  'ActiveDocument、Saved = True'强制执行“否”   ActiveDocument、Close ’退出  Next End If  End With   Application、ScreenUpdating = True   MsgBox "所选Word文档得页眉页脚已删除!!!”, 64, ”☆★处理完毕★☆”  End Sub   现在,我们关闭窗口,重新回到word界面,按下宏快捷键,Alt+F8,瞧到刚才得宏名,点击运行;  接着软件会让我们选择要批量处理得文件夹,选中之,然后稍等片刻,即会弹出--所选Word文档得页眉页脚已删除。
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服