Hi,
I'd like to create a macro to open a Word document from Excel.
I am receiving Run-time error '429': ActiveX component can't create object when I execute the code.
I don't have admin privileges to perform the regedit that is called out in this article. This also has to work on several computers.
https://support.microsoft.com/en-us/topic/you-receive-run-time-error-429-when-you-automate-office-applications-b6070e15-ea78-4349-2751-72bdb5f186f7
I tried the following code and I get an error on step 1.
Is there another way to get past the error?
I'd like to create a macro to open a Word document from Excel.
I am receiving Run-time error '429': ActiveX component can't create object when I execute the code.
I don't have admin privileges to perform the regedit that is called out in this article. This also has to work on several computers.
https://support.microsoft.com/en-us/topic/you-receive-run-time-error-429-when-you-automate-office-applications-b6070e15-ea78-4349-2751-72bdb5f186f7
I tried the following code and I get an error on step 1.
1: Set oWord = CreateObject("Word.Application")
Code:
Sub test ()
Dim oWord As Word.Application
Dim oExcel As Excel.Application
On Error Goto err_handler
1: Set oWord = CreateObject("Word.Application")
2: Set oExcel = CreateObject("Excel.Application")
' ... some other code
err_handler:
MsgBox "The code failed at line " & Erl, vbCritical
End Sub
Is there another way to get past the error?