table alignment property always returns left

Sep 5, 2013 at 10:51 AM
I have a sample document with table centre aligned in the document.
When I load the document using DocX and reterive the table and try to get Table.Alignment, it returns left, even though it is centre aligned.

Please find the code sample to first create the doc using DocX and then load the same and check alignment.

1) using (var document = Novacode.DocX.Create(@"C:\TestDoc.doc"))
                var int_t = document.AddTable(2, 2);
                int_t.Alignment =;
                var int_t1 = document.AddTable(3, 2);
                int_t1.Alignment = Novacode.Alignment.left;

                // Save this document.
2) using (DocX novaDoc = Novacode.DocX.Load(@"C:\TestDoc.doc"))
                var table1 = novaDoc.Tables[0];
                var table2 = novaDoc.Tables[1];
                        table1.Alignment ==
                        && table2.Alignment == Novacode.Alignment.left,
                        "Could not manage Alignment property of a table"