Free Support Forum - aspose.com

Converting DOCX to MSG - wrong formatting

Hi,


When converting a DOCX file to MSG (by first converting to MHTML) I get some formatting issues. I am using Aspose.Words 10.7.0.0.

The source document is attached, as well as the resulting MSG (zipped).

There are two issues:

- Bullets are converted into symbols
- On the space between the symbol and its succeeding label, the font is set to “Times new roman”.

I am using the code below.

Is there anything I can do to avoid the issues above?

var wordDocument = new Aspose.Words.Document(memoryStream);

var mhtmlStream = new MemoryStream();

wordDocument.Save(mhtmlStream, SaveFormat.Mhtml);

mhtmlStream.Position = 0;

MailMessage message = MailMessage.Load(mhtmlStream, MessageFormat.Mht);

MemoryStream mapiMsgStream = new MemoryStream();

MapiMessage mapiMsg = MapiMessage.FromMailMessage(message);

mapiMsg.SetMessageFlags(MapiMessageFlags.MSGFLAG_UNSENT);

mapiMsg.Save(mapiMsgStream);

Hi Joao,


Thank you for inquiry. While using latest Aspose.Words 11.0.0, i am unable to reproduce this problem. I have attached tested example of MHTML.


Hope this will help. In case of any ambiguity, please let me know.


Hi,


I get exactly the same MHTML as you attached to the previous post.

As I initially mentioned, there are two problems there. Let me try to make myself clearer:

- Bullets are converted into symbols. This is more noticeable in the end MSG file, where we don’t get real “bullets” but rather symbols (text). The question is if it is possible to create real bullets when converting from MHTML to MSG. I wonder if the MHTML contains
  • elements (instead of the symbols) the desired result would be achieved.

- On the space between the symbol and its succeeding label, the font is set to “Times new roman”. Just look at the HTML source code and you’ll find the following:

<span style=3D"font:7.0pt ‘Times New Roman’">   &#=
xa0;    

Regards,
Joao Silva

Hi Joao,


Thank you for inquiry. While using latest Aspose.Words 11.1.0. I managed to reproduce this problem on my side. I have logged your issue into our bug tracking system. Your request has also been linked to the appropriate issue. Once we sort it out, we will let you know. Sorry for inconvenience.


Hi there,

Any news on this issue? Is it fixed in any of the newer releases?

Kind regards
Decypher

Hi Decypher,


Thanks for your inquiry. Unfortunately, this issue is not resolved yet. This issue is pending for analysis and is in the queue. We will keep you informed regarding the status of this issue and let you know once it is resolved.

Best Regards,

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


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