PDA

Click to See Complete Forum and Search --> : Footer And Header


jamal464
Nov 15th, 2006, 12:25 PM
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



Dim oWord As Word.Application
Dim oDoc As Word.Document
Dim oFooter As Range
Dim oRange As Range
Dim oEntry As AutoTextEntry

Set oWord = New Word.Application
oWord.Visible = True

Set oDoc = oWord.Documents.Add

Set oFooter = oDoc.Sections(1).Footers(wdHeaderFooterPrimary).Range
Set oEntry = NormalTemplate.AutoTextEntries("Page X of Y")

Set oRange = oEntry.Insert(oFooter)
oRange.ParagraphFormat.Alignment = wdAlignParagraphCenter

oDoc.Close False
oWord.Quit False