cancel
Showing results for 
Search instead for 
Did you mean: 

Expanding a folder in Outlook shared mailbox

BenAnderson
Level 5
Hi, 

I have a business requirement to expand a folder within a shared mailbox. So the mailbox structure would be similar to the below where I am trying to expand the second account/mailbox so that it shows as below:
28510.png
In order to do this programmatically, I have tried to add an action to extend the MS Outlook VBO with the following code:

28511.jpg
The code has no errors (using the 'Check Code' button), and compiles fine. However whenever I step over it, I get the following error:

28512.png
Whenever I run the above VB code as a macro in Outlook, it works fine and expands the second folder without any issues. However running it in BP gives the above error message. I think the issue seems to lie in line 6, but can't be sure. 

Having spent quite a bit of time on google, would anyone be able to provide any assistance on why this is not working please?

Many thanks for your help,
Kind regards,
Ben


------------------------------
Benjamin Anderson,
Senior Consultant,
UK
------------------------------
Benjamin Anderson, Senior Consultant, UK
2 REPLIES 2

PvD_SE
Level 12
Hi Ben,

It's been a while I worked with Outlook, but as far as I remember, you could just state the sub-folder you're trying to get email from. So it does not need to expand first. 

What is the reason you need to expand the folder?

------------------------------
Happy coding!
---------------
Paul
Sweden
------------------------------
Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)

Hi @PvD_SE

Many thanks. We have found issues whilst trying to move emails between sub-folders, and discovered that if the folder structure is expanded then the email will move, however if the folder structure is collapsed, then the email doesn't move and BP gives an "Operation Failed" error message.​
I appreciate this shouldn't be the case, but whatever way Outlook has been configured on the VMs, we thought a workaround was a code stage to expand the folders, as we can't seem to get to the bottom of the root cause.

Many thanks,
Ben

------------------------------
Benjamin Anderson,
Senior Consultant,
UK
------------------------------
Benjamin Anderson, Senior Consultant, UK