Word.Range rng=doc.Sections.Item(1).Footers.Item(wdHeaderFooterPrimary).Range
rng.Text = "page "
rng.Collapse(wdCollapseEnd)
doc.Fields.Add(rng wdFieldPage "Page")
rng.Text = " of "
rng.Collapse(wdCollapseEnd)
doc.Fields.Add(rng wdFieldNumPages "Page")
rng.Collapse(wdCollapseEnd)
rng.Text = " total"
doc.Sections.Item(1).Footers.Item(wdHeaderFooterPrimary).Range.Fields.Update
doc.Sections.Item(1).Footers.Item(wdHeaderFooterPrimary).Range.ParagraphFormat.Alignment = wdAlignParagraphCenter
Collapse([`&Direction]).
rng.Collapse(Word.WdCollapseDirection.wdCollapseEnd)
This parameter cannot be set