文档页数:
n := WordApplication1.Selection.Information[wdNumberOfPagesInDocument];
移动光标到指定页首:
procedure GotoPageNumber(WrdApp: TWordApplication;PageNumber:OleVariant);
var
what,which,Count:OleVariant;
begin
what:=wdGoToPage;
which:=wdGoToNext;
Count:=WrdApp.Selection.Information[wdNumberOfPagesInDocument];
WrdApp.Selection.GoTo_(what,which,Count,PageNumber);
end;