Modify the subject of a mail

Nice solution can you please explain for better understanding

Dim OlApp As Microsoft.Office.Interop.Outlook.Application
Dim MailItem As microsoft.Office.Interop.Outlook.MailItem
OlApp = New Microsoft.Office.Interop.Outlook.ApplicationClass
MailItem = CType(olapp.Session.GetItemFromID(in_MailMessage.Headers(“uid”)),microsoft.Office.Interop.Outlook.MailItem)
MailItem.Subject=in_NewSubject
MailItem.Save()