PIP - Send email with outlook from vba

(Uipath 21.10) In PIP mode, I want to use Excel VBA to send an email via Outlook.

I’m getting the outlook error - The file C:\Users\xxxx\appdata\local\microsoft\outlook\myEmail.ost cannot be opened.

I see in 2021.8 outlook may have been added to PIP without having to close outlook on the main computer.

I have the office 365 package installed.

Has anyone got this working?

hello @SteveTin,
Welcome to UiPath Forum good to see you here,
From my understanding of your problem,
You need to * Allow UiPath outlook activity by using the steps:-

  1. Open Outlook as Administrator (right click on the Outlook application → Run as Administrator)
  2. In top menu bar, click File
  3. Click Options
  4. Click Trust Center
  5. Click Trust Center Settings
  6. Click Programmatic Access
  7. Select “Never warn me about suspicious activity”
  8. Click OK

I hope I could help you,
happy automation :robot: .


Thank you.

I tried your steps and changed the trust center settings, then ran the robot.

The same error popped up, “… the .ost cannot be opened”

I would love to know more about your problem.
can you try to close your outlook application in you main computer or by using kill process activity with process name property as “outlook”.

I hope I could help you,
happy automation :robot: .

The robot works when outlook is closed on the main computer.
I’m hoping to keep the main computers outlook open.


If not, I would settle for having the robot close outlook on the main and open outlook in pip, then afterwards reopen on main.

I suggest you use another version of outlook if you want to use two outlook applications like outlook 2016.
or you could use for example mailontor mail for test purposes.

I hope I could help you,
happy automation :robot: .