WordApplication1.Selection.InsertAfter('第');
mmm:=wdCharacter;
WordApplication1.Selection.Move(mmm,nnn);
WordApplication1.Selection.Fields.Add(WordApplication1.Selection.Range,aaa,mmm,nnn);
aaa:=wdFieldNumPages;
WordApplication1.Selection.InsertAfter('页,共');
WordApplication1.Selection.Move(mmm,nnn);
WordApplication1.Selection.Fields.Add(WordApplication1.Selection.Range,aaa,mmm,nnn);
WordApplication1.Selection.InsertAfter('页');
WordApplication1.ActiveWindow.ActivePane.View.SeekView := wdSeekMainDocument;