Hi
I am trying to create a new email in Outlook 2007, and save it to local disc in vb.net.

It creates the new file, saves it, and I can open it from local disc(by double clicking on file) while outlook is still open.

But when I close outlook, and then try to open the file from disc, it does show the email message, but WITH an error messagebox saying : "Object reference not set to an instance of an object."

Anyone have an idea what could be wrong?

Code:
Imports Microsoft.Office.Interop.Outlook
Public Class save_message

Private Sub btn_send_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_send.Click

Dim oApp As Outlook.Application
Dim oMsg As Outlook.MailItem
oApp = New Outlook.Application()
oMsg = oApp.CreateItem(Outlook.OlItemType.olMailItem)
With oMsg
    .To = "[email protected]"
    .Subject = "this is the subject"
    .Body = "this is the body"
End With
oMsg.SaveAs("c:\temp.msg", OlSaveAsType.olMSG)

End Sub