cancel
Showing results for 
Search instead for 
Did you mean: 

Word: Cannot create ActiveX component

PvD_SE
Level 12

Hi folks,

We have two processes (let's call them process A and process B) that both run on the same VDI. Both processes create Word documents and save them in a folder. Process A runs under user A, and process B runs under user B.  In order to create each document, a 'MS Word VBO - Create Instance' action is done, followed by an 'MS Word VBO - Open' action. 

When process A tries to do the 'Create Instance', it always crashes with exception:
ERROR: Internal : Could not execute code stage because exception thrown by code stage: Cannot create ActiveX component.
As a result of this, no Word documents are created. Note that we kill the Word instance after each attempt.

When process B does the same, on the same VDI, the 'Create Instance' does not fail, and the process continues with the 'Open' action and manages to create the Word document without any issues.

When we run process A on another VDI, the 'MS Word VBO - Create Instance' action does not crash, and all documents are created correctly. So, why not schedule process A on that other VDI? Unfortunately, this gives us a scheduling head-ache with other processes. Also, since we haven't solved the problem, the issue is likely to return (at least according to Murphy's law).

Of course, I did my few hours of mandatory googling before daring to ask you. On the ole interweb, it is alleged that the 'Cannot create ActiveX component' error is caused by a missing DLL in the BP installation. Although if you ask Microsoft the same thing, they propose to re-install MS Office. 

Now for my questions.

  • If we have two users each running (different) processes on the same VDI, do these processes run in the same instances of BP and MS Office?
  • If Yes on the previous question:
    How come one process can handle the 'MS Word VBO - Create Instance' action correctly, while the other on the same VDI can not?

Any other suggestions relating to solving the above mystery are more than welcome.



------------------------------
Happy coding!
---------------
Paul
Sweden

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

Anton__Hosang
Level 5

Hi Paul

I'd attack the difference - users. What read/write permissions does UserA lack?

On the 2nd VDI, is it run on UserA there too? What different permissions on that machine?

I'd look into the Users A & B under Computer Management on VDI1 and see what different groups they are members of. The launching of ActiveX may require permissions of full-control(or even just read)certain dlls in the System.

27733.png



------------------------------
Anton Hosang
Director
Omega RPA Ltd
------------------------------

Hi Anton,

Good point, I'll check that out. Thanks!



------------------------------
Happy coding!
---------------
Paul
Sweden
------------------------------

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

Update:
This issue turned out to be Word (or Office 365) throwing all kind of popups for the user on the VDI when running action 'MS Word VBO - Create Instance'. An admin logged in as the offending user and clicked away all popups and other nonsense that turned up. After that everything Wordy worked again.



------------------------------
Happy coding!
---------------
Paul
Sweden

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