WPCubed Product Support

TWPTextObj.EmbeddedText: How to preserve carriage returns?

I move the contents of one merge field to another (in different documents if it matters) using:

WPTextObj2.EmbeddedText := WPTextObj1.EmbeddedText;

However, any formatting is lost, we only get the plain text. The formatting we are particularly interested in is the carriage returns. Is there a way to achieve this, please?

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

Hi,

EmbeddedText does not write CRs right now.

Sincy You have the PRO version You can add one line at the end of

function TWPTextObj.GetEmbeddedText: WideString;

to write at least NewLines:

...
par := par.next;
if par<>nil then
Result := Result + #10;
end;
end;
end;

Thoise should be preserved when assigning EmbeddedText, crnl cannot be assigned to EmbeddedText since it won't create new paragraphs.

Julian

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