-
Annoying footers
Hi Guys,
Here is my code;
Dim oSec As Word.Section
Dim oDoc As Word.Document
Set oDoc = Word.ActiveDocument
Selection.Font.Size = 10
Selection.Font.Italic = False
With oDoc
Set oSec = .Sections(1)
oSec.PageSetup.DifferentFirstPageHeaderFooter = True
oSec.Footers(wdHeaderFooterPrimary).Range.Text = "testing..."
oSec.Headers(wdHeaderFooterPrimary).Range.Text = "Page "
End With
I am going to expand on what needs to be written into each with several variables being written there. I also need to put the page number on the footer. I have tried recording a macro... this doesnt help me at all. How can I create a string such as;
"Page " & pagenumber & " Your Ref: " & yourref & " Our Ref " & ourref
to write into my footer?