Evening all,
I have a folder with 10,000 .msg files in it. I need to convert the .msg files to the .html format. I do
not need to convert any attachments included in the .msg files.
I am developing in C#, VS2010 and Outlook 2003 is installed on my pc. Also, this software will only be used in-house. So, my first thought was to use the Outlook Interop, specifically the OpenSharedItem() method but I receive the exception below the code segment.
MailItem fld = (MailItem)app.Session.OpenSharedItem(pathToMSGFile);
Unhandled Exception: System.AccessViolationException: Attempted to read or write
protected memory. This is often an indication that other memory is corrupt.
at Microsoft.Office.Interop.Outlook._NameSpace.OpenSharedItem(String Path)
at OutlookTest.Program.Main(String[] args)
After doing some further research, it appears that I cannot save .msg files as .htm files using Outlook 2003. Has anyone managed to get around the error above?
Note : I have tried Redemption and it works but the 'non-commercial' developer version, puts a 'this is an evaluation version' message at the top of each converted file. Redemption's documentation specifies that their product is free to use in non-commercial software. Is there a free version of Redemption available that does not include this message? I could remove this message from the html files but I am not sure if that is legal.