WPCubed Product Support

Getting text of Header and Footer

This is probably a simple thing but I am stuck on it. I want to return the text of a header or a footer. Just as you can get the text of the body by using:

wpRichedit1.Text;

I want to return similar for other letter sections so logically like:

MyString := wpRichedit1.Header.text;

#1 ♥ 0
6k Views 2 users read 1 min
support

Use

WPRichtext.Header.Get( ... ).RTFText.AsString

Julian

#2 ♥ 0

THe code above gives error: Undeclared identifier 'Get. When replaceing with:

WPRichText1.HeaderFooter.Get(wpIsHeader, wpraOnAllPages).RTFText.AsString;

you receive the WPTools formatted text rather than the plain english text as you do when using wpRichEdit1.text

I am doing a replacement of the plain text so I need the plain text from the header (and eventually footer)

Thanks for your assistance.

#3 ♥ 0
support

Similar to a TWPRichText, just use

WPRichText1.HeaderFooter.Get(wpIsHeader, wpraOnAllPages).RtfText.AsANSIString('ANSI')

#4 ♥ 0

There is no method for AsAnsiString. Returns Undeclared Identifier. I have version 5.18. Should I have a newer version?

#5 ♥ 0
This category is archived. No new posts are possible.