Table Border Problems When Saving as Docx

Run this code using the attached Word 97 template:

Dim mylicense As New License
Dim FName As String = "C:\Inbound\For Aspose.dot"

mylicense.SetLicense("Aspose.Words.lic")
doc = New Document(FName)
doc.Save(Replace(FName, ".dot", ".docx"), SaveFormat.Docx)

Notice how the table borders are messed up on pages 2 and 3. Output document is also attached.

Hi Steve,

Thanks for your inquiry. I have checked your shared documents both .Dot and Docx. Both document have same table layout. Please see the attached image for detail. It would be great if you please share some more information about table’s borders issue.

Try this one.

Hi Steve,

Thanks for sharing the document. I have managed to reproduce the same issue at my side. I have logged this issue as WORDSNET-7394 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Here’s another document we found with similar issues. See page 2 after running the code.

Hi Steve,

Thanks for sharing the document. I have tested the scenario and have not found any issue with output Docx file while using latest version of Aspose.Words for .NET. Please find the output Docx file in attachment.

Document doc = new Document(MyDir + "For+Aspose+(2).dot");
doc.Save(MyDir + "AsposeOut.docx");

Upgrading from 11.9 to 11.10 did fix this latest one. I retested the original document in this ticket - that one is still incorrect.

Hi Steve,

Thanks for your inquiry. The issue WORDSNET-7394 is related to your original document which is not resolved yet. We will update you via this forum thread once this issue is resolved.

We appreciate your patience.

The issues you have found earlier (filed as WORDSNET-7394) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

We have a new variation of this problem. Use the same code from the original post, but use the attachment I posted here. When I reopen the docx with Word 2007, it displays fine. But with Word 2010, the right borders are jagged. I tested with Aspose.Words version 14.5.

One other thing I just noticed on page 2. Look at the text which begins with “Person Who Otherwise Shows…”. The bottom portion is truncated. Again, only with Word 2010.

Hi Steve,

Thanks
for your inquiry. I have tested the scenario and have not found the both issues shares by you. Please check the attached output Word document.

I suggest you please use CompatibilityOptions.OptimizeFor method. This method allows to optimize the document contents as well as default Aspose.Words behavior to a particular versions of MS Word.

Document doc = new Document(MyDir + "For+Aspose.dot");
doc.CompatibilityOptions.OptimizeFor(MsWordVersion.Word2010);
doc.Save(MyDir + "Out.docx");

That didn’t help. I displayed your generated document with Word 2010 build 14.0.7125.5000. Same issues.

Hi Steve,

Thanks
for your inquiry. Please check the attached images of output document. Could you please share the screen shots of problematic section of output document?

Here they are.

Hi Steve,

Thanks
for sharing the screenshots. Unfortunately, I am uanble to find this issue when output document is opened in MS Word 2010. Could you please check the same issue at some different systems? I checked this document at Windows 7 (64 bit).

According to a Microsoft website (https://answers.microsoft.com/en-us/msoffice/forum/all/how-to-upgrade-office-2010-from-14047341000-to/9e22add6-c481-4da0-ad1f-71864d23e1f3), you are using a pre-released version of Office 2010. Do you have a platform with the released version and all service updates applied? 14.0.7125.5000.

We figured it out. It’s a bad Microsoft Word 2010 update (KB2880529). See
https://answers.microsoft.com/en-us/msoffice/forum/all/formatting-problems-with-tables-in-word-after/29b73109-2f73-4a0c-bccb-276fe4e55f03

We had two VM’s with the same version of Word with just two differences with updates. One was OK, one was not. So we just unstalled them one at a time and discovered the bad one.

Thanks for your diligence in helping us with this.

Hi Steve,

Thanks for your feedback. It is nice to hear from you that your problem has been solved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.