1

I have several automation scripts that I wrote to move information in and out of Office applications using VBA. I put all of these together using Office 2003 on a Window 7 computer.

My organization finally got around to moving over to using Windows 10 and Office 2016, and the changeover broke all of the scripts that open one application from the other.

Each script uses these two lines to start the other application:

Dim objExcel As Excel.Application
Set objExcel = CreateObject("Excel.Application")

If I run this snippet from Word started as a standard user, I get an error saying, "Run-time error '429': ActiveX component can't create object" and debugging tells me the error is from the 'CreateObject' line.

If I run Word as an Administrator, though, Excel starts like I expect it to and I'm able to work with the application object.

I don't want to have to run the application or the automation scripts as an administrator. I'm guessing this is a configuration issue, but my google-fu is failing me.

How do I allow access to the Office applications automation object model from standard users in Windows 10?

Jordan
  • 11
  • 1
  • 1
    This should work fine with standard users so maybe you have some "extra" security settings implemented by your IT group. Maybe review your project references and compile the VBA project to check for issues. – Tim Williams Dec 11 '20 at 18:40
  • 1
    Changing the first line to `Dim objExcel As Object` might help to isolate where the error occurs. Right now, you have a mix of early binding and late binding which is unnecessary – barrowc Dec 11 '20 at 21:33

0 Answers0