怎么从一个模板里面复制页脚呢?
下述代码是实现了页眉的复制 怎么补充实现页眉也复制过来呢?
Dim app As New MSWord.Application
try
Dim doc0 As Object = app.Documents.Open("d:\test2.docx")
app.ActiveWindow.ActivePane.View.SeekView = MSWord.WdSeekView.wdSeekCurrentPageHeader
app.ActiveWindow.Selection.WholeStory
app.ActiveWindow.Selection.Copy
app.ActiveWindow.ActivePane.View.SeekView = MSWord.WdSeekView.wdSeekMainDocument
Doc0.Close
Dim fileName = "d:\test.docx"
Dim doc As Object = app.Documents.Open(fileName)
app.ActiveWindow.ActivePane.View.SeekView = MSWord.WdSeekView.wdSeekCurrentPageHeader
app.ActiveWindow.Selection.WholeStory
app.ActiveWindow.Selection.TypeBackspace
app.ActiveWindow.Selection.Paste
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