//插入页眉
WordApplication1.ActiveDocument.Sections.First.Headers.Item(wdHeaderFooterPrimary).Range.Text := 'trtr';
FirstPage:=False;
PageNumberAlignment := wdAlignPageNumberCenter;
WordApplication1.ActiveDocument.Sections.First.Footers.Item(wdHeaderFooterPrimary).PageNumbers.Add(PageNumberAlignment,FirstPage);