Indenting a header/footer with HTML code

  • Hi all,
    My client wants headers and footers to have a a different margin from the body. I am able to do it using input text but the input is not plain text, it will contain merge fields and are stored as HTML (See sample Input). The code workes perfectly if I enter in a plain string but entering in HTML it will indent the first <Div> but not subsequent <div>s. What happens is that the reader divides the HTML up into paragraphs and only indents the first as can be plainly seen in the sample output ( Note : input was cTestText for the header and cTestHTML for the footer). In particular look at line 4 of the rtf output and notice the indents have been reset.
    How do I make the indent continue thoughout the header/footer?

    Thanks in advance

    sample Input


    Delphi Code IndentedHeaderFooter

    SAMPLE OUTPUT (RTF)

  • Looks like I solved it

    • Offizieller Beitrag

    Hi,

    To specify left and right aligment of a table use the properties WPAT_BoxMarginLeft and WPAT_BoxMarginRight.

    You can use WP.Table.ASet to set the property if the cursor is currently in a table.

    Julian

  • Thanks for your reply.
    I had manged to work it out on my own about an hour before your post using WPAT_BoxMarginLeft and turning of the max box width. But your suggesttion has made the code alot neater

    [/quote]