Add the two lines as shown below
Code:
Sub ReplaceHeaderFooter(ByVal oDoc As Document)
Dim oSec As Section
Dim oHead As HeaderFooter
Dim oFoot As HeaderFooter
Dim oRng As Range
Dim oShape As InlineShape
For Each oSec In oDoc.Sections
oSec.PageSetup.HeaderDistance = InchesToPoints(0.06)
oSec.PageSetup.FooterDistance = InchesToPoints(0#)
For Each oHead In oSec.Headers
'etc