cancel
Showing results for 
Search instead for 
Did you mean: 

MS Outlook VBO (NetOffice) - Failed to proceed Method on Outlook.NameSpace=>GetDefaultFolder

flavio.lara
Level 5

Hello Experts!

We are using BP v7.3.1 and the new VBO "MS Outlook VBO (NetOffice)" to read emails using "Get Received Items (Basic)" action.

Outlook is started using a separate object that selects the desired profile.

The first call of action "Get Received Items (Basic)", everything works fine!

If my process closes Outlook (for any reason), opens it again, and then calls the action "Get Received Items (Basic)", I receive the error:

ERROR: Internal : Could not execute code stage because exception thrown by code stage: Failed to proceed Method on Outlook.NameSpace=>GetDefaultFolder.

 

After that, any call to "MS Outlook VBO (NetOffice)", results in an exception. For example, if I call the action "Quit Outlook" I receive the error:

ERROR: Internal : Could not execute code stage because exception thrown by code stage: Failed to proceed Method on Outlook.Application=>Quit

I have to finish my process and start the execution from zero, then I can use the "MS Outlook VBO (NetOffice)" again. But, if the process closes Outlook, the problem returns.

I've tried calling "Quit Outlook" to close Outlook before restarting it, but the problem remains the same.

I'd appreciate any tips about this problem.

Regards,

Flavio

4 REPLIES 4

ewilson
Staff
Staff

Hi @flavio.lara 

My guess is this issue is due to the underlying NetOffice library holding a reference to the running instance of the Outlook client. If the instance disappears for some reason, the NetOffice DLL isn't refreshing it's link.

We'll take a look and see if there's anything we can do to address this.

Cheers,
Eric

Many thanks, @ewilson 
I agree with you Eric, something is holding the "connection" with outlook and avoiding a new instance of Netoffice to communicate with Outlook.

I'll share my findings... I've tried to move back to the legacy MS Outlook VBO. I've added the Outlook interop dll back to BP install folder, but I have the same problem (if I close outlook and open it again, error). Now a different error message, but an error following the same steps sequence.
This legacy Outlook VBO was downloaded from DX.

So I tried my old VBO (from BP 6.10.2) and it worked perfectly. Then I compared the codes and realized that the declaration of the app and namespace objects changed from the "Internal_Get_Items" page to a global declaration in the "Initialize" page.
The last VBO that declares the objects inside the "Internal_Get_Items" page was distributed with BP 7.2.1.
The version on DX moved it to initialize (and rises an error following the steps I've mentioned).
Legacy Outlook VBO - BP v7.2.1

flaviolara_0-1729788388365.png

No code in "global" declarations

flaviolara_1-1729788645681.png

Legacy Outlook VBO from DX

flaviolara_2-1729788845902.png

Object olApp and olNamespace are declared in Global Code and initialized via code inside "Initialize" page.

Inside "Internal_Get Items" page the objects are used... 

flaviolara_3-1729788995927.png

I'm sharing that because NetOffice VBO has the same idea. The objects are declared in Global Code, which could affect how they are "disposed" of after Outlook closes.
According to my tests, we have an issue with both VBOs available in DX (NetOffice and the Legacy Outlook VBO).

As soon as we find a solution We'll move back to NetOffice VBO. For now, We'll use the version delivered with BP v7.2.1. (knowing that it will not work with the new Outlook Client)

Thank you very much for your help.  Let us know if We can help with more details.
Regards,

Hi @flavio.lara 

Thanks for including your analysis. I believe we had originally changed the code in an attempt to clean up memory instead of constantly creating and releasing object references, but perhaps we'll need to roll that back.

Cheers,
Eric

xlxu001
Level 5

@ewilson are there any updates on this topic or workaround that can be added to the Global declarations of the .Net VBO? Here are the errors we are getting:
ERROR: Internal : Could not execute code stage because exception thrown by code stage:
Failed to retrieve default folder for Account Display Name 'XXXXX'.
Failed to proceed PropertyGet on Outlook.NameSpace=>Accounts.

Lourdes Urena Sr Solutions Engineering Grainger Panama Services Panama