1. word怎麼刪除頁眉頁
1、刪除單個文檔的頁眉頁腳
雙擊頁眉處,進入編輯狀態,然後選中文本內容按刪除鍵,之後再點擊開始——字體——清除所有格式清除頁眉橫線,最後關閉頁眉和頁腳即可。
2、刪除多個文檔的頁眉頁腳
如何批量刪除上百個Word文檔的頁眉頁腳呢?
這里需要借用VBA來實現。
新建一個空白文檔,點擊開發工具——Visual Basic,在打開的界面中點擊插入——模塊,然後復制以下代碼:
Sub 批量刪除頁眉頁腳()
'此代碼功能為列出指定文件夾中所有選取的WORD文件全路徑名
Dim myDialog As FileDialog, oDoc AsDocument, oSec As Section
Dim oFile As Variant, myRange As Range
On Error Resume Next
'定義一個文件夾選取對話框
Set myDialog =Application.FileDialog(msoFileDialogFilePicker)
With myDialog
.Filters.Clear '清除所有文件篩選器中的項目
.Filters.Add "所有Word文件", "*.doc,*.docx", 1 '增加篩選器的項目為所有Word文件
.AllowMultiSelect = True '允許多項選擇
If .Show = -1 Then '確定
For Each oFile In .SelectedItems '在所有選取項目中循環
Set oDoc =Word.Documents.Open(FileName:=oFile, Visible:=False)
For Each oSec In oDoc.Sections '文檔的節中循環
Set myRange =oSec.Headers(wdHeaderFooterPrimary).Range
myRange.Delete '刪除頁眉中的內容
myRange.ParagraphFormat.Borders(wdBorderBottom).LineStyle= wdLineStyleNone '段落下邊框線
Set myRange =oSec.Footers(wdHeaderFooterPrimary).Range
myRange.Delete '刪除頁腳中的內容
Next
oDoc.Close True
Next
End If
End With
End Sub
點擊運行,之後會跳出相應的對話框,然後選擇要清除的文檔打開即可批量刪除頁眉頁腳。
2. 如何批量刪除一個文件夾下所有Word文件的頁眉和頁腳麻煩詳細說明,在線等
如果頁眉頁腳是相互鏈接的,只要刪除任意一頁的,其它頁面也就一起刪除了,刪除的方法地,雙擊頁眉或頁腳,將框中的內容刪除即可。
3. WPS文檔怎麼批量或者全部刪除掉文件的頁眉和頁腳
批量刪除word文檔的頁眉頁腳,可以用下面的vba程序來實現,需要注意的是,在批量操作前,先做好備份。
Sub 批量刪除文件夾裡面所有Word文檔的頁眉頁腳()
Dim Fdlg As FileDialog, Fl
Dim Fso, Fld, Fln, Wk
Set Fdlg = Application.FileDialog(msoFileDialogFolderPicker)
With Fdlg
.Title = "選擇要處理目標文件夾" & "——(刪除裡面所有Word文檔的頁眉頁腳)"
If .Show = -1 Then
MyPath = .SelectedItems(1)
Else
Exit Sub
End If
End With
Set Fso = CreateObject("Scripting.FileSystemObject")
Set Fld = Fso.GetFolder(MyPath)
Set Fln = Fld.Files
For Each Wk In Fln
Set myDoc = Documents.Open(FileName:=Fld & "\" & Wk.Name)
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 Sub
4. 如何徹底刪除頁眉
徹底刪除頁眉的具體步驟如下:
我們需要准備的材料分別是:電腦、word文檔。
1、首先我們打開需要編輯的word文檔,點擊打開插入中的「頁眉」下面的倒三角形。
5. 如何批量修改多個word的圖片頁眉頁腳,或者刪除
批量修改或刪除word含圖片的頁眉頁腳的方法如下:
1、通過桌面快捷方式或搜索來打開word文檔。
6. 如何批量刪除上百個word文檔的頁眉頁腳
批量刪除word文檔的頁眉頁腳,可以用下面的vba程序來實現,需要注意的是,在批量操作前,先做好備份。
Sub 批量刪除文件夾裡面所有Word文檔的頁眉頁腳()
Dim Fdlg As FileDialog, Fl
Dim Fso, Fld, Fln, Wk
Set Fdlg = Application.FileDialog(msoFileDialogFolderPicker)
With Fdlg
.Title = "選擇要處理目標文件夾" & "——(刪除裡面所有Word文檔的頁眉頁腳)"
If .Show = -1 Then
MyPath = .SelectedItems(1)
Else
Exit Sub
End If
End With
Set Fso = CreateObject("Scripting.FileSystemObject")
Set Fld = Fso.GetFolder(MyPath)
Set Fln = Fld.Files
For Each Wk In Fln
Set myDoc = Documents.Open(FileName:=Fld & "\" & Wk.Name)
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 Sub
7. 如何刪除Word新建文檔中的頁眉頁腳
1、打開一個Word文檔,可以看到裡面具有頁眉和頁腳;
2、在插入中找到「頁眉」和「頁腳」兩個圖標;
8. 怎麼刪掉頁眉
滑鼠雙擊要刪除頁眉的位置,激活頁眉編輯,然後再點擊菜單中的插入,單擊頁眉,再選擇刪除頁眉,最後按Esc鍵退出即可,頁眉就被刪除了
9. word中目錄的頁眉如何去掉詳解。
在不進行分節的話word是默認將所有的頁都視為一節的,而在這一節中的所有頁面的頁眉、頁
腳,頁腳,背景等都是相同的。如果想要使某些頁的頁眉與其他頁不相同,或者取消頁眉,那
么只需要將想要去掉頁眉的頁與其他頁進行分節就可以了,具體操作如下:
1、首先將滑鼠游標定在目錄頁的最後一個字元後面。
10. 怎樣去除所有頁眉頁腳
在實際工作中,我們時常需要添加頁眉頁腳,那如果不需要,該如何刪除呢?怎樣批量刪除多個文檔的頁眉頁腳呢?本期與大家分享相應的技巧。
1、刪除單個文檔的頁眉頁腳
雙擊頁眉處,進入編輯狀態,然後選中文本內容按刪除鍵,之後再點擊開始——字體——清除所有格式清除頁眉橫線,最後關閉頁眉和頁腳即可。
PS:想了解更多刪除頁眉橫線的刪除方法,可以查看《Word文檔中間的橫線,怎麼刪除不了?》。
2、刪除多個文檔的頁眉頁腳
如何批量刪除上百個Word文檔的頁眉頁腳呢?
這里需要借用VBA來實現。
新建一個空白文檔,點擊開發工具——Visual Basic,在打開的界面中點擊插入——模塊,然後復制以下代碼:
Sub 批量刪除頁眉頁腳()
'此代碼功能為列出指定文件夾中所有選取的WORD文件全路徑名
Dim myDialog As FileDialog, oDoc AsDocument, oSec As Section
Dim oFile As Variant, myRange As Range
On Error Resume Next
'定義一個文件夾選取對話框
Set myDialog =Application.FileDialog(msoFileDialogFilePicker)
With myDialog
.Filters.Clear '清除所有文件篩選器中的項目
.Filters.Add "所有Word文件", "*.doc,*.docx", 1 '增加篩選器的項目為所有Word文件
.AllowMultiSelect = True '允許多項選擇
If .Show = -1 Then '確定
For Each oFile In .SelectedItems '在所有選取項目中循環
Set oDoc =Word.Documents.Open(FileName:=oFile, Visible:=False)
For Each oSec In oDoc.Sections '文檔的節中循環
Set myRange =oSec.Headers(wdHeaderFooterPrimary).Range
myRange.Delete '刪除頁眉中的內容
myRange.ParagraphFormat.Borders(wdBorderBottom).LineStyle= wdLineStyleNone '段落下邊框線
Set myRange =oSec.Footers(wdHeaderFooterPrimary).Range
myRange.Delete '刪除頁腳中的內容
Next
oDoc.Close True
Next
End If
End With
End Sub
點擊運行,之後會跳出相應的對話框,然後選擇要清除的文檔打開即可批量刪除頁眉頁腳。
313閱讀
搜索
word中批量刪除回車
一鍵去掉word頁眉橫線
批量刪除多頁內容word
頁眉橫線怎麼徹底刪除
word怎麼把頁眉刪掉
批量刪除頁眉頁腳