Creating Word Application using Excel VBA: Run-time error '429': ActiveX component can't create object Creating Word Application using Excel VBA: Run-time error '429': ActiveX component can't create object vba vba

Creating Word Application using Excel VBA: Run-time error '429': ActiveX component can't create object


I had an issue when upgrading from Windows 7 to 10 when bringing my hoard of VBA scripts with me. Still not sure what the root cause of the error is, but in the mean time this piece of code worked for me.This is a workaround that limits the need to have Word (or Outlook/Excel) already in open (manually) state, but should allow your script to run if you have your references set. Just change "CreateObject(" to "GetObject(, ". This will tell the system to use an already open window.

The complete code to use would be:

Dim wrdApps As ObjectDim wrdDoc As ObjectSet wrdApps = GetObject(, "Word.Application")


I recently had this happen to some code I had written. Out of nowhere (after running successfully for a few months), I would get the same Runtime Error '429'. This happened on two separate computers, the one I wrote and tested the code on months prior and the computer of the person who actually used the tool. It happened even though I used the original file on my machine and the user had been using his copy successfully for a few months, so I'm not convinced two separate files on two separate machines both got corrupted in the same manner. With that being said, I don't have a good explanation of why this occurred. Mine would happen on a similar line of code:

Dim objFSO as ObjectSet objFSO = CreateObj("Scripting.FileSystemObject")

I had the reference to the scripting library included and had done this successfully in the past.

I was able to fix the problem by changing from late to early binding on that object:

Dim objFSO as New Scripting.FileSystemObject

I have been switching everything over to early binding for some time now but this was some legacy code. A nice short little explanation on the difference between the two can be found here:https://excelmacromastery.com/vba-dictionary/#Early_versus_Late_Binding

I'm not entirely certain why that fixed the problem, but hopefully it will help others in the future with similar issues.


Is wrdDoc initialised? Are you trying to use wrdDoc before the object has been Set?

wrdApps.documents.Add wrdDoc.FullNameSet wrdDoc = wrdApps.documents.Open(ThisWorkbook.Worksheets(3).Range("f" & i).Value)

Should the first line be ActiveDocument.FullName as in the comments? So:

wrdApps.documents.Add ActiveDocument.FullName