Hello,
We are using Aspose.Words.dll 9.1.0.0. We are converting the MSG and its attachments to TIF. During the conversion, the exception “Illegal characters in path” is being thrown. I have uploaded a problem MSG file.
Here is an example of the code we are using for the conversion:
namespace OutlookTester
{
class Program
{
static void Main(string[] args)
{
Aspose.Network.License licenseNetwork = new Aspose.Network.License();
licenseNetwork.SetLicense("Aspose.Network.lic");
Aspose.Words.License licenseWords = new Aspose.Words.License();
licenseWords.SetLicense("Aspose.Words.lic");
MapiMessage msg = MapiMessage.FromFile("Outlook.msg");
using (MemoryStream rtfStream = new MemoryStream())
{
TextWriter tw = new StreamWriter(rtfStream);
tw.Write(msg.BodyRtf);
tw.Flush();
Document doc = new Document(rtfStream);
ImageOptions imgOptions = new ImageOptions();
imgOptions.Resolution = (float)200;
imgOptions.TiffCompression = TiffCompression.Ccitt4;
for (int i = 0; i < doc.PageCount; i++)
doc.SaveToImage(i, 1, "image" + i.ToString() + ".tif", imgOptions);
}
}
}
}