Sadly, Environment.NewLine doesn’t work when the text is in a table cell. I found a few alternatives for VBdotNet or C#, but I’m not able to make it works with UIPath :
@pierreg, this is a workaround, not a solution. I am thinking we need a complete UiPath.OfficeOpenXML.Activities, any thoughts? I believe the Word activities so far are based on DocX, which is easier to use but has less functionality than OOXML, IMHO.
Instead of fields, which threw exceptions for me, I have used bookmarks in the table cells. I realize this may defeat your purpose.
There’s a backup of the target doc included in the archive for experimentation purposes.
Thanks @burque505 for your help, but UIPath support team told me the perfect and simple solution : instead of adding Environment.Newline to my string (where I want a line break), I add “^p” : it’s the newline character in Word.
@pierreg, thanks for sharing that! That will help me out as well. If you could post a line of your code that shows how that’s actually implemented I’d really appreciate it.
I got some other tips from this link that might come in handy also. For example, I just tried both ^p and ^013 in a test doc, and got the same results for either.