以下是引用有点甜在2014-10-29 14:15:00的发言:
参考
Dim app As New MSWord.Application
try
Dim fileName = "d:\test.doc"
Dim doc As Object = app.Documents.Open(fileName)
app.ActiveWindow.ActivePane.View.SeekView = MSWord.WdSeekView.wdSeekCurrentPageHeader
app.ActiveWindow.Selection.TypeText(Text:="自己的页眉")
app.ActiveWindow.ActivePane.View.SeekView = MSWord.WdSeekView.wdSeekMainDocument
app.Visible = True
catch ex As exception
msgbox(ex.message)
app.Quit
finally
'app.Quit
End try
以前的页眉如何去掉?