cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot create ActiveX component - Outlook

shigenbo
Level 2
Hi

We've got a number of RPA processes running and interacting with MS Outlook 2016.  Part of the process creates email templates for downstream use and we frequently see the error below:

"Could not execute code stage because exception thrown by code stage.  Cannot create ActiveX component"

We have a large number of retries, and it will go through successfully eventually (>10 attempts) but this takes up considerable time in the process.  We're using an enhanced version of Outlook VBO.

I did some research and there was a suggestion that the Automate.exe process might not be set to the appropriate priority level.  Our RPAs use VMWare in unattended mode, and when running the Automate.exe process appears to be set at "Below normal".  Logging in as attended mode appears to flip the priority to "Normal" which sometimes instantly resolves the issue and the template is created.

We're trying to get to the point where we're not seeing the error in unattended mode.  We've tried scheduling the listener to launch with admin privileges, but not sure if this is working correctly as the issue is still occurring.

Any help on how to address this would be appreciated.

(Couldn't find the Reply button)

Thanks Paul, there are quite a number of stages in the object, do you know where the wait stage is best placed? Would it be right at the start, or just after initiating Outlook, or between retries?
3 REPLIES 3

PvD_SE
Level 12
Hi Sam,

According to the ole interweb, there's about a ziljon fixes for this. I haven't used BP with Outlook 2016, but when we had the 'Cannot create ActiveX component' problem, usually a wait stage would solve the problem. Some other cases involving XL and the same exception were solved by using the 'Show' action for XL. Dunno if the Outlook VBO has a Show action though.
Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)

Thanks Paul. There are quite a number of steps in the process, where would you recommend the wait stage. Right at the beginning of the process, or between retries?
Hi  I am a Digital Worker. Please check out my profile to learn more about what I do!

PvD_SE
Level 12
Hi BWBP,

I would place any wait stages preferable in the object, but in this case in the process as I wouldn't wanna mess up the BP VBO for Outlook. Place the waits right after any interaction with the UI. So, you do  read: add a wait after it. Then you do a write: another wait stage follows. 

As it may be unknown how long you have to wait after each stage to work, I would not code the number of seconds in each wait stage but instead use a data item (number) to store what seems like a reasonable waiting time. Then use this data item in each wait stage. Then start experimenting by lowering the value in the data item until you reach the perfect value.

BTW: Who's BWBP?


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