Free Support Forum - aspose.com

Styles getting changed

I saw some earlier discusssion on this and my problem seems similar:

After a mailmerge and a few deletions, the style of the bullets in the resulting document are different from the source document.

The before and after files are attached. Can you take a look?

Thanks.

Charu Tevari

I've attached sample code to aid reproduction of the problem.

You can see in the output file that the bullet style changes- the bullet character has changed and the indent/tab also has changed in the first bullet.

Thanks.

Charu Tevari

Thanks for reporting this issue to us and also for providing all necessary materials to reproduce the error. After a quick research I have found that list styles get changed even if the document is simply loaded and saved in Aspose.Words. But thanks for providing test project anyway.

I have logged this issue to our defect base. We will deal with it as soon as our schedule permits. You'll be informed of the results here in this thread.

The problem may [at least partially] go back to MSWord.

In MSword I created 2 list styles bltStyl1, bltStyl2, and applied the styles to different bullets in the document. When I then change one of the styles bltStyl1 by changing the bullet character and apply this style to a bullet that formerly had style bltStyl2, several of the bltStyl2 bullets change their bullet character leading me to speculate that word may be attempting to change the style of all of the bullets it infers to be items of the same list, but it does not do so in a consistent and well defined way.

By way of background, for the example I sent in, when I first created the document, the custom bullet style "JBullet" used for the bullet character, a wingding character consisting of an empty square. I later modified this style to use the filled square wingding character. In MSWord the style appears correctly, but the old style definition seems to be retained in the document and some of the manipulation of the document by Aspose.Words seems to have made the JBullet style revert to using the earlier style definition character [empty square], though in theory, a bullet/list style using the empty square no longer exists. I can't find a documented way to excise the earlier style definition though I would have expected that modifying the style should have removed any history of the earlier style anyway.

Hope this helps in tracking down a solution.

Although direct list and table formatting is supported, list styles and table styles are not fully supported by Aspose.Words at the moment. If you don't use list styles all list formatting will be preserved okay. We are working to support list and table styles in the future, but there is nothing I can fix at the moment.

List styles are fully supported in Aspose.Words.3.6.2

This document now looks perfectly identical after the open-save sequence.