open second document and copy footer

G

Gina

Hi all.

I'd like to copy the footer of a given file into the paste board
to paste it into a word doc that is already open and should get that new
footer

any help highly appreciated

thx Gina

my code so far:

Sub getInvoiceFooter()
Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
Dim strDataFile As String


strDataFile = ActiveDocument.Path & "\" & "Footer.docx"
Set wrdApp = New Word.Application
Set wrdDoc = wrdApp.Documents.Open(strDataFile)

With Selection

Selection.GoTo what:=wdGoToPage, which:=wdGoToFirst
Selection.Collapse Direction:=wdCollapseStart

' '' but ActiveDocument or ActiveWindow cannot be the right way ;)
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader

WordBasic.GoToFooter

.... ?


' I'd like to copy the whole footer here


End With

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top