WPCubed Product Support

Address labels MkII

Julian

I decided that I'd go for the first block of left aligned text (that should allow me to print my letterhead) but I'd like to keep the bolding, colour etc (if any) in the address.

Your approach

apar := WPRichText1.BodyText.AppendNewPar;
apar.SetText(TRIM(par.ANSIText));
apar.ASet(WPAT_IndentLeft, 72);
apar.ASet(WPAT_IndentRight, 72);

doesn't do this and I can't figure out how to copy the attributes.

Roy

#1 ♥ 0
3.8k Views 1 links 2 users read 1 min
support

Hi,

I don't know where the quoted code comes from.

But if you want to copy a par the from one part in a document to another or from one editor to another (if those use the same RTFProps!) use this code:

src := WPRichText1.ActiveParagraph;
   dest := WPRichText1.BodyText.AppendNewPar;

   dest.Assign(src, true, []);
   dest.Trim;

   WPRichText1.ReformatAll(false, true);
#2 ♥ 0
This category is archived. No new posts are possible.