I am working with Novacode DocX and using this same code over 2 different projects products 2 different results.
Dim customerAddress = doc.InsertParagraph(SetCustomerAddress(recipient))
customerAddress.Alignment = Alignment.left
customerAddress.SetLineSpacing(LineSpacingTypeAuto.None)
Private Shared Function SetCustomerAddress(recipient As String) As String
Dim sb As New StringBuilder()
sb.AppendLine(recipient)
For Each line In RecipientAddress
If Not String.IsNullOrEmpty(line) Then
sb.AppendLine(line.Trim())
End If
Next
Return sb.ToString()
End Function
In the one word document it produces the text with no additional lines between, and the other with a space between each line.
I have checked the output in the watch window when debugging and it is being produced as I expect. Its only when I get into the Word Document is there an issue.
Any and all help greatly received.
Thanks
After building new documents with this and having the same issue, I went back a version from 1.0.0.22 to 1.0.0.19 and the issue went away.
For anyone that stumbles across this issue in the future then try dropping down to version 1.0.0.19