We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Alignment changes when appending a document that has a table in it

I have a document I am appending to an existing document, and the document I am appending has an embedded table. The alignment of the cells is being changed from left to center when I append it. I am using the following code:

attachDoc.FirstSection.PageSetup.SectionStart = SectionStart.NewPage;
attachDoc.FirstSection.PageSetup.RestartPageNumbering = false;
doc.AppendDocument(attachDoc, ImportFormatMode.KeepSourceFormatting);

In the original document one cell has an alignment of justify and this one stays justify. The others are all changed from left to center. Is there any other option I can use to keep this from happening?

Hi Curtis,

Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word documents
  • Source code without compilation errors to reproduce the issue on our end
  • Aspose.Words generated Word document that shows incorrect behavior
  • Your expected Word document which shows the correct output. Please create this document using Microsoft Word application.

As soon as you get these pieces of information ready, we’ll start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip them and Click ‘Reply’ button that will bring you to the ‘reply page’ and there at the bottom you can include any attachments with that post by clicking the ‘Add/Update’ button.

Best regards,