Hi

How to set the header tow lines

first line the format will be to the left

Seconde line the format will be center

For the footer i found this code but i want to add line before the page no

VB Code:
  1. Dim oWord As Word.Application
  2.     Dim oDoc As Word.Document
  3.     Dim oFooter As Range
  4.     Dim oRange As Range
  5.     Dim oEntry As AutoTextEntry
  6.    
  7.     Set oWord = New Word.Application
  8.     oWord.Visible = True
  9.    
  10.     Set oDoc = oWord.Documents.Add
  11.    
  12.     Set oFooter = oDoc.Sections(1).Footers(wdHeaderFooterPrimary).Range
  13.     Set oEntry = NormalTemplate.AutoTextEntries("Page X of Y")
  14.    
  15.     Set oRange = oEntry.Insert(oFooter)
  16.     oRange.ParagraphFormat.Alignment = wdAlignParagraphCenter
  17.    
  18.     oDoc.Close False
  19.     oWord.Quit False