Sub 全篇删除页脚()
' 定义当前页变量
Dim n
' 初始值1循环自增到1000页退出
For n = 1 To 1000 Step 1
' 跳转到指定页 如果把n改成指定页建议加双引号
Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext, Name:=n
Selection.Find.ClearFormatting
' 删除选中页页脚
WordBasic.RemoveFooter
' 删除选中页页头 没试过
' WordBasic.RemoveHeaders
Next n
End Sub
VBA word office VB 删除页脚或页眉
于 2023-10-26 21:39:13 首次发布