cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Outlook Profiles using Outlook VBO

pranavred
Level 6
Will there be any support on reading emails from multiple Outlook profiles using the latest Outlook VBO. As of now, Outlook VBO could only read the default Outlook profile. 
Pranav
52 REPLIES 52

Hi Ami,

My requirement is the I need to send emails from Shared Mailbox and not from the BOT's profile. I cannot make shared mailbox as default profile as BOT is a shared one. Could you please provide me the code which can take the Profile name just like MAPIEX?

------------------------------
Manohara M
Senior Project Engineer
Wipro Technologies
Asia/Kolkata
------------------------------

Check the post I made at 06-05-2019 15:52 (at least on my timezone). It contains a code excerpt, as well as a fully-built VBO to handle this.

------------------------------
Ami Barrett
Sr Product Consultant
Blue Prism
Plano, TX
------------------------------

HI Ami, 

I have not asked you a question personally but you my friend have been so helpful. I wanted to express my gratitude for all the help you have rendered. 

I'm extremely interested in learning how to create/modify VBOs the way you do. If you can share a good place to start learning it will be greatly appreciated. 

Thanks

------------------------------
Heber Pereira
------------------------------

Honestly? Google and Stack Overflow are two of my best friends. Though when it comes to modifying an office application specifically, I'll also refer to their VBA guide. The Excel and Word VBOs are atypical compared to how you would extend the other VBOs, so I've also in the past just copied and modified an existing code stage that seemed somewhat similar.

The short of it is: "How do I do [x] in [y] language?" So if that comes to "How do I modify a column of a collection in C#", I'll search "C# datatable modify column" and see what I can find. If it's something like shared inboxes in outlook, I'll literally just search "outlook vba shared mailbox" and go from there.

Best practice if you're modifying an out of the box VBO, is to create a separate one and label it "Extended", so you can import new releases of the originals later on without losing any data.

Personally, I prefer to develop anything new in C# because that's where my coding background prior to Blue Prism mostly is. The only major downside is that it makes it more difficult when trying to share actions to people who are trying to combine them with the base VBOs, because those are in VB. But really, it's all personal preference.



------------------------------
Ami Barrett
Sr Product Consultant
Blue Prism
Plano, TX
------------------------------

I appreciate your response. 

Question: I tried doing the above to be able to read emails from shared mailbox subfolder but I cannot get it to work. I'm able to read from the shared mailbox inbox but that's about it. 

Do you know what could be preventing me from getting access to the shared mailbox subfolders. I made sure all the folders in the shared mailbox were visible with owner rights to my main inbox. 

How can I get the outlook folder ID maybe if I pass the folder ID it will work. 



------------------------------
Heber Pereira
------------------------------

The "Shared E-Mail" field needs to be the e-mail address of the shared inbox, not the label.

If you want the folder IDs, you'd have to loop through each folder and write out the name and number someplace. Inbox always has the same folder number, so the sub-folder field would theoretically always match to that.

Otherwise, I found that in some instances of O365, there was a security patch pushed within the last year or so that prevents this from working. If the above doesn't work, give the new version of the official VBO a try, or have your process automate Outlook to click the mailbox you're trying to read and then modify the code stage to read the currently selected folder.



------------------------------
Ami Barrett
Sr Product Consultant
Blue Prism
Plano, TX
------------------------------

Thank you for the answer. 

One more thing. Where can I go to grab the latest version of the outlook VBO? 



------------------------------
Heber Pereira
------------------------------

Either contact our support and they'll supply one, or grab the latest version and pull a copy of the VBO out of the /VBOs directory within.

------------------------------
Ami Barrett
Sr Product Consultant
Blue Prism
Plano, TX
------------------------------

Hi Ame,
If i use the below code getting choose profile dialog,how to avoid that popup.
_nameSpace.Logon(Profile, , True, True)​

I tried

_nameSpace.Logon(Profile, , False, True)

Please help me.



------------------------------
Sindura Eaga
---------------

According to the VBA documentation, False, True should get around this. (Though I've personally never had any issue with True, True, which in hindsight is a little surprising.) Have you made sure that programmatic access is enabled in Outlook?

------------------------------
Ami Barrett
Automation Developer, Team Lead
Blue Prism
Plano, TX
------------------------------