How can I insert a text with line breaks in a bookmark?

Questions and answers on how to use DOCXReadWrite
Post Reply
jsilva
Posts: 2
Joined: Thu Apr 21, 2022 9:48 am

How can I insert a text with line breaks in a bookmark?

Post by jsilva »

Hello
I am using version 1.01.33
I am trying to give value to a bookmark with a text that contains line breaks

Bmk.PlainText := 'Line 1'+#10#13+'Line2';

The expected result is
Line 1
Line2

but i get
Line 1 Line2

What am I doing wrong?

Thanks in advance
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: How can I insert a text with line breaks in a bookmark?

Post by larsa »

Hello

Use InsertFileText of the Paragraph the bookmark is in.
Lars Arvidsson, Axolot Data
jsilva
Posts: 2
Joined: Thu Apr 21, 2022 9:48 am

Re: How can I insert a text with line breaks in a bookmark?

Post by jsilva »

Thanks for your reply.
Post Reply