High Importance flag in outlook

studio

#1

Hi,

I could not able to set Importance flag while sending mail from outlook.
I passed in assign value as MailMsg.Priority = MailPriority.High. Mail received successfully, but importance flag missing.

Anyone please help me in this issue…

Thanks in advance.
Priority


#2

Hi @dineshbabu8k,

Did you check this existing topic? It might help you.

Regards,
Rahamat


#3

Hi Rahamat,

I already checked the link which you provided. There is no solution given in that thread.

Regards,
Dinesh


#4

Hi,
The response given by the UiPath team is that it is not currently possible to set the high importance flag in outlook. We used a workaround. Started the email subject with “URGENT”


#5

If you are using Invoke code activity this can be done. Use the below code.

Dim OutlookApp As Microsoft.Office.Interop.Outlook._Application
OutlookApp = New Microsoft.Office.Interop.Outlook.ApplicationClass
Dim mail As Microsoft.Office.Interop.Outlook.MailItem = DirectCast(OutlookApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem), Microsoft.Office.Interop.Outlook.MailItem)
mail.Subject = “Test Email”
mail.Body = “Test Email”
mail.To = “emailID”
mail.Importance = Microsoft.Office.Interop.Outlook.OlImportance.olImportanceHigh
mail.send()

You’ll have to import outlook interop namespace as well.
Let me know if it works.