This worked for me with Outlook 2013
olApp = New Microsoft.Office.Interop.Outlook.Application()
olSess = olApp.Session
mi = olSess.OpenSharedItem("Path to .msg file")
mi.Display(True)
olApp.Quit()
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
we want to create a Reply-Message in our VB.NET Project from a Outlook-Message File (msg).
Backgroud is, that out Support-System archives incoming messages as msg-Files.
The user should be able to push the reply or reply all button - and when sends the mail the application write the new .msg-file back in a database.
I can open these files with Outlook from our ERP-App with:
oOutL = New Outlook.Application
oMail = oOutL.CreateItem(Outlook.OlItemType.olMailItem)
oMail = oOutL.CreateItemFromTemplate("C:\temp\OEM\Test.msg")
oMail.Display(True)
But this diplays the message in edit-mode and I have no reply-button to answer:
If I start the msg-file with a process.start(C:\temp\OEM\Test.msg) - command - I get a message with reply buttons but can't take care of the onSend-Event later.
Is there a way to create an Outlook Message from a .msg-File and and display the reply/reply-all buttons (or put it in reply mode) from vb.net (to take care of the onsend event later and write the reply message back to our database when the user sends the reply message)?
Thanks for any Help.
Regards,
Marco
This worked for me with Outlook 2013
olApp = New Microsoft.Office.Interop.Outlook.Application()
olSess = olApp.Session
mi = olSess.OpenSharedItem("Path to .msg file")
mi.Display(True)
olApp.Quit()