var
mmm,nnn,aaa:OleVariant;
begin
mmm:=wdLine;
nnn:=1;
aaa:=wdFIEldPage;
WordApp.ActiveWindow.ActivePane.View.SeekVIEw :=wdSeekCurrentPageHeader ;
WordApp.Selection.Move(mmm,nnn);
WordApp.Selection.ParagraphFormat.Alignment := wdAlignParagraphCenter;
WordApp.Selection.InsertAfter('第');
mmm:=wdCharacter;
WordApp.Selection.Move(mmm,nnn);
WordApp.Selection.FIElds.Add(WordApp.Selection.Range,aaa,mmm,nnn);
aaa:=wdFIEldNumPages;
WordApp.Selection.InsertAfter('頁/第');
WordApp.Selection.Move(mmm,nnn);
WordApp.Selection.FIElds.Add(WordApp.Selection.Range,aaa,mmm,nnn);
WordApp.Selection.InsertAfter('頁');
WordApp.ActiveWindow.ActivePane.View.SeekVIEw := wdSeekMainDocument;
end;
可是只能修改第一頁的,怎麼修改後面的頁面的頁眉?