This project has moved. For the latest updates, please go here.

Spacing in table cells

Nov 27, 2012 at 5:30 PM

Using code to generate a table. By default it appears the cell contents are being created with 10pt spacing after the contents; I'd like to make this zero. Here's what I've tried;

        For Each lRow As Row In tbl.Rows
            For Each lCell As Cell In lRow.Cells
                For Each p1 As Paragraph In lCell.Paragraphs
                    p1.LineSpacingAfter = 0
                Next
            Next
        Next

In debug, I can see the value of p1.LineSpacingAfter is 10, and it remains unchanged. I've also tried

                    p1.LineSpacingAfter = 0.0F

...with no effect.

Can anyone tell me how to set the linespacingafter property for the cell contents?