How can i use line break symbols in string custom property

Feb 27, 2012 at 9:17 AM

How can i use line break symbols (\n\r) in string custom property?

Unfortunately, Enviroment.NewLine is not suitable for this purpose.

Or it is impossible?

Coordinator
Feb 27, 2012 at 3:02 PM
Hi KvanTTT,

if I remember correctly Microsoft Word does not allow multi-line custom property values.

Its been awhile since I implemented CustomProperties but I remember that this was a (Microsoft Word) design decision that really annoyed me.

Can you please verify this? Try and create a multiline CustomProperty using Microsoft Word, if you cannot then DocX will not allow you to do so either.

Kind regards,
Cathal

P.s. I think the solution using both Word and DocX is multiple CustomProperties such as AddressLineOne, AddressLineTwo, etc
Mar 2, 2012 at 8:48 AM

Hello coffeycathal. Thank you for response.

 

No, Microsoft Word supports multi-line custom properties (both "Enter" and "Shift + Enter") but DocX library does not (Enviroment.NewLine not work).

Instead I use ReplaceText function for this purpose.