为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

批量删除Word文档页眉或页脚的方法

2017-10-23 5页 doc 20KB 49阅读

用户头像

is_713593

暂无简介

举报
批量删除Word文档页眉或页脚的方法批量删除Word文档页眉或页脚的方法 ,,,,,,,,,,word?ü?,?,,,?? 1,,,,,,,,,2,,, ,,word,,,,,,,棬--,,--?,,,º,-- ,,,,,,,Macro1,,,,?,,,,,,?,š,,,,Macro2,,,,?,,,,,,?,š,--,,,,,???? 2,,,,,,,,--,,--,??,, 3,,,,,,--,,--,, 4,,,,,,,,?,š,,,,,,,???, ,,,,,,,,,,,,,,?,?,, Sub,,,,?,,()?? Application.Scree...
批量删除Word文档页眉或页脚的方法
批量删除Word文档页眉或页脚的方法 ,,,,,,,,,,word?ü?,?,,,?? 1,,,,,,,,,2,,, ,,word,,,,,,,棬--,,--?,,,º,-- ,,,,,,,Macro1,,,,?,,,,,,?,š,,,,Macro2,,,,?,,,,,,?,š,--,,,,,???? 2,,,,,,,,--,,--,??,, 3,,,,,,--,,--,, 4,,,,,,,,?,š,,,,,,,???, ,,,,,,,,,,,,,,?,?,, Sub,,,,?,,()?? Application.ScreenUpdating = False Dim MyPath As String, i As Integer, myDoc As Document With Application.FileDialog(msoFileDialogFolderPicker) .Title = ",,,,,,?,,,?,,," & ",,,,(,,,,,,,,,,,Word,?,,,?ü?,,)"??? If .Show = -1 Then MyPath = .SelectedItems(1) Else Exit Sub End If End With With Application.FileSearch .LookIn = MyPath .FileType = msoFileTypeWordDocuments If .Execute > 0 Then For i = 1 To .FoundFiles.Count Set myDoc = Documents.Open(FileName:=.FoundFiles(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 ,,,1-4,,,,,,,,,,?ü,,,,,,,,,,?? Sub ,,,,?ü()?? Dim myDialog As FileDialog, oDoc As Document, 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", 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 5,,,,,,,,,??, ,,,,,,,,?ü?,,?? 6,,,,,,--,,--,, 7,,,,,,,,,,,,,??? 8,,,,,,,,,,,,,,,,?,,,,???
/
本文档为【批量删除Word文档页眉或页脚的方法】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索