Mattersphere Developers Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down
avatar
Lynne Harding
Posts : 335
Join date : 2018-12-20

Carriage Returns in Merge Fields Empty Carriage Returns in Merge Fields

Mon 30 Mar 2020 - 8:13
We are experiencing an issue when a merge field is placed in a table in a Word precedent. If the data contains carriage returns they are rendered as square symbols and not as actual carriage returns; however if the same merge field is placed outside a Word table it renders fine.Has anyone experienced/noticed this issue before?
avatar
Lynne Harding
Posts : 335
Join date : 2018-12-20

Carriage Returns in Merge Fields Empty Re: Carriage Returns in Merge Fields

Mon 30 Mar 2020 - 8:14
What version of Word are you running?, there have been bugs in word for years around the use of CHR(13)+CHR(10) for the newline sequence in fields and how these are handled differently, you maybe able to change the field data to have only one of the character escape sequences to either CHR(10) or CHR(13) can't remember which is the specific culprit causing this but we do this internally for some other areas of word because of this type of isse.
Possible work around is therefore replace Environment.NewLine with CHR(10) on your original string field in code or in the database when storing the data.
avatar
Lynne Harding
Posts : 335
Join date : 2018-12-20

Carriage Returns in Merge Fields Empty Re: Carriage Returns in Merge Fields

Mon 30 Mar 2020 - 8:14
Peter has offered the following suggestion which I have tried and it works:”Place a carriage return after the field in the table.(after the curly brackets)”
Sponsored content

Carriage Returns in Merge Fields Empty Re: Carriage Returns in Merge Fields

Back to top
Permissions in this forum:
You cannot reply to topics in this forum