High Importance flag in outlook


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.

Hi @dineshbabu8k,

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


Hi Rahamat,

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


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”

1 Like

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

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

1 Like

Hello, your solution looks cool, however, I cannot find post regarding how to import outlook interop namespace neither in Forum nor Documentation, Could you please provide a reference on how to do this? Thanks a lot in advance!!!

Hi, you can import the outlook namespace from the import tab in the studio.

Sorry for the delayed response.

Thank you @midhunsug661 .
And yes, I can make the namespace named Microsoft.Office.Interop.Outlook shown in the Imports per the steps you provided. However, there are some errors stopped me from running the code…

The errors are still there after I restarted my Studio… Could you please help?

Sorry for the delay. Are you still having trouble with this?


ActivitiesCustomOutlook.1.0.0.nupkg (6.3 KB)

You can use the attached custom activity which will enable you to set the importance to the mail.
Let knw if you face any issues using the activity.


Thank you!

Why don’t you UiPath people include this option in “Send Outlook Mail Message” activity then?


Any update on this??? I need to set High importance on “Get Outlook Mail Message”. Anyone please help…