The code I sued for WPTools 5 for inserting a page no in the footer no longer seems to work in WPTools7. However, it is the same code that appears at 45 of the pdf manual for WPTools 7. Any ideas? code is:
var par : TParagraph;
txtplain : Cardinal;
begin
par:=WPRichText1.HeaderFooter.Get(wpFooter,wpraOnAllPages).
FirstPar;
WPRichText1.WritingAttr.Clear;
WPRichText1.WritingAttr.SetFontName('Courier New');
WPRichText1.WritingAttr.SetFontSize(900); // 9pt
txtplain := WPRichText1.WritingAttr.CharAttr;
par.ClearText;
par.ASet(WPAT_Alignment, Integer(paralRight));
par.Insert(0,'Page ',txtplain);
par.InsertNewObject(maxint, wpobjTextObject, false, false,
txtplain).Name := WPTextFieldNames[wpoPageNumber];
par.Insert(maxint,' of ',txtplain);
par.InsertNewObject(maxint, wpobjTextObject, false, false,
txtplain).Name := WPTextFieldNames[wpoNumPages];
end;