Modify the subject of a mail

The Below code was written in vb.net using interop dll.

Dim OlApp As Microsoft.Office.Interop.Outlook.Application // declaring outlook application
Dim MailItem As microsoft.Office.Interop.Outlook.MailItem // declaring mail item
OlApp = New Microsoft.Office.Interop.Outlook.ApplicationClass // intializing outlook application object.
MailItem = CType(olapp.Session.GetItemFromID(in_MailMessage.Headers(“uid”)),microsoft.Office.Interop.Outlook.MailItem) //using uid of mailmessage headers type casting into mail item type.
MailItem.Subject=in_NewSubject // changing to new subject.
MailItem.Save()// saving mail message item