Remove Spacing Between Paragraphs in Address Blocks
When you stack short lines like an address block, IronWord's default paragraph spacing leaves a visible gap between each line. To close that gap, set a fixed line-spacing value on every paragraph so each line gets a fixed height with no extra padding. Verified on IronWord 2026.4.1.
Solution
1. Create the Document and List the Lines
Start a new WordDocument and collect the lines you want stacked together.
WordDocument doc = new WordDocument();
string[] addressLines =
{
"Max Mustermann",
"Musterstraße 42",
"12345 Musterstadt",
"Deutschland"
};
WordDocument doc = new WordDocument();
string[] addressLines =
{
"Max Mustermann",
"Musterstraße 42",
"12345 Musterstadt",
"Deutschland"
};
Dim doc As New WordDocument()
Dim addressLines As String() = {
"Max Mustermann",
"Musterstraße 42",
"12345 Musterstadt",
"Deutschland"
}
2. Apply a Fixed Line-Spacing Value to Each Paragraph
For each line, build a Paragraph and set its SpacingBetweenLines property to a fixed value. This gives every line a consistent height and removes the inter-line gap.
foreach (string line in addressLines)
{
Paragraph para = new Paragraph(new TextContent(line));
para.SpacingBetweenLines = 210;
doc.AddParagraph(para);
}
foreach (string line in addressLines)
{
Paragraph para = new Paragraph(new TextContent(line));
para.SpacingBetweenLines = 210;
doc.AddParagraph(para);
}
For Each line As String In addressLines
Dim para As New Paragraph(New TextContent(line))
para.SpacingBetweenLines = 210
doc.AddParagraph(para)
Next
3. Save the Document
doc.SaveAs("address3.docx");
doc.SaveAs("address3.docx");
doc.SaveAs("address3.docx")

Debug Tips
- Do not use
ParagraphSpacing: the class is not available in2026.4.1. - Avoid zeroing
SpacingBeforeandSpacingAfter: setSpacingBetweenLinesto a fixed value instead, as shown above, for predictable results.
SpacingBetweenLines to a fixed value over zeroing SpacingBefore and SpacingAfter, as shown above, for reliable paragraph spacing.For more on placing text, see the Add Text how-to.

