MSG files created by Outlook Converter behave differently from those created by Outlook

MailBee.NET Objects MailBee.NET Objects MailBee.NET Objects Windows Windows Windows COM/ActiveX COM/ActiveX COM/ActiveX .NET .NET .NET Outlook Outlook Outlook problem problem problem compatibility compatibility compatibility
In some situations, MSG files generated by MailBee.NET Objects can behave a bit differently from those generated by Microsoft Outlook. In such cases, it may be a good idea to have them rebuilt by Outlook. For instance, this can be done with a following sample VBScript code:

Set outlookApp = CreateObject("Outlook.Application")
Set sessionObj = outlookApp.Session

sessionObj.Logon outlookApp.Name

Set oMsg = sessionObj.OpenSharedItem(WScript.Arguments(0))
oMsg.SaveAs WScript.Arguments(1)

sessionObj.Logoff


The script can be used as follows:

cscript inout.vbs "e:\in.msg" "e:\out.msg"

"in.msg" and "out.msg" stand for source and destination files respectively.
Back to articles list