FancyPrairie
Programmer
I have 600 word documents that were done incorrectly (headers and footers have same image multiple times). To fix the problem I've created a template with a header and footer as they should be. Then I wrote code to attach the template to the existing documents. Problem is, AttachedTemplate command does seem to work (header and footer are not shown).
What am I doing wrong?
My code looks like this:
What am I doing wrong?
My code looks like this:
Code:
Function FixWordDocs()
Dim oWord As Word.Application
Set oWord = New Word.Application
oWord.Documents.Open "test.doc"
oWord.ActiveDocument.AttachedTemplate = "NewHeaderFooter.dot"
oWord.Visible = True
set oWord = Nothing
End Function