Using Visual Basic 2008.
Below is a code snippet I use to automate Word:
I use the same formatting with the NewLine to produce a pdf file, and this works fine. When I produce the Word document each NewLine is treated was a paragraph and the results is too much space between lines. The Word output looks like this:
instead of this
Can someone help me?
Below is a code snippet I use to automate Word:
Code:
strLetter.Append("John Smith")
strLetter.Append(Environment.NewLine)
strLetter.Append("1 Main Street")
strLetter.Append(Environment.NewLine)
strLetter.Append("Any Town")
strLetter.Append(Environment.NewLine)
oWord.Selection.TypeText(strLetter.Text.ToString())
I use the same formatting with the NewLine to produce a pdf file, and this works fine. When I produce the Word document each NewLine is treated was a paragraph and the results is too much space between lines. The Word output looks like this:
Code:
John Smith
1 Main Street
Anytown
instead of this
Code:
John Smith
1 Main Street
Anytown
Can someone help me?