在发一个 删除Word文件页眉-页脚-水印的程序 刚才没成功
Private Sub DOCcl(ByVal DocPath As String, ByVal SaveAsPath As String)
'删除Word文件页眉-页脚-水印 '
'需要引用 microsoft word XX object library
'
'DocPath 需要修改的文档
'SaveAsPath 新文档的路径
'
'例子: DOCcl "c:\test.doc","c:\test1.doc"
Dim t As New Application
Dim doc As Document
Set doc = t.Documents.Open(DocPath, , False)
t.ActiveDocument.Sections(1).Range.Select
t.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
t.Selection.HeaderFooter.Shapes("PowerPlusWaterMarkObject1").Select
t.Selection.Delete
t.ActiveDocument.Sections(1).Footers(1).Range.Delete
t.ActiveDocument.Sections(1).Headers(1).Range.Delete
t.ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
doc.SaveAs SaveAsPath
doc.Close
Set doc = Nothing
Set t = Nothing
End Sub