- Offizieller Beitrag
Q: How to set different margins for all header/footer in document
A: I would recommend to use negative indents. This code will modify all header and footer elements in the document:
Code
var i : Integer;
begin
for i:=0 to WPRichText1.HeaderFooter.Count-1 do
if WPRichText1.HeaderFooter[i].Kind in [wpIsHeader, wpIsFooter] then
begin
WPRichText1.ActiveText := WPRichText1.HeaderFooter[i];
WPRichText1.SelectAll;
WPRichText1.CurrAttr.IndentLeft := -760;
WPRichText1.CurrAttr.IndentRight:= -760;
end;
WPRichText1.ActiveText := WPRichText1.BodyText;
end;
Alles anzeigen