I’m trying to replace the subject of a mail in my Inbox without using the lib Alphabet.
The goal is to replace the subject on the inbox, not to replace the subject and forward the mail,
I’m stucked with this so if someone have an idea i greatly welcome it
Thanks for your reply but what i am trying to do is to replace an activity that does this (the package is using uipath.system.activites 18.4, it’s the reason why we want to change this)
Thanks ! It was exactly what i tried to do but i didn’t find the convertion of mailmessage to mailitem and it seems that it was hard to find.
I marked your reply as solution
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()
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