@JKapanke wrote:
I was having an issue with an unreadable character showing up in a Microsoft Word ( Office 365 ) document after using Environment.NewLine to split a single line of addresses into addressLine1 and addressLine2
Below is the Assign process I was using for addressLine1 and addressLine2 separated onto 2 different lines for display in a Word document. Some of the addresses only had one address line while other addresses had two address lines so I had to account for both situations and not have a blank line in the Word document if there wasn’t an addressLine2
addressLines = addressLine1.Trim + Environment.NewLine + addressLine2.Trim
This is what it looked like in the Word document - note the small square in front of addressLine2 ( Apt 109 )
I replaced the Environment.NewLine with :
addressLines = addressLine1.Trim + vbCr + addressLine2.Trim
That worked as expected. Has anyone else run into this issue using Environment.NewLine in MS Word Office 365 and if so is there an alternative way of handling? If not, then this is one way around that issue.
Posts: 1
Participants: 1