I keep getting a Run-time error '429' (ActiveX component can't create object) on the following line in the UpdateFileData sub:
Code:
Set wdDoc = Documents.Open(strDoc, AddToRecentFiles:=False, ReadOnly:=False, Format:=wdOpenFormatAuto, Visible:=False)
*EDIT* I did find a solution, and it appears to work; but I'm not completely happy with it.
From Excel Help:
Quote:
|
The class isn't registered. For example, the system registry has no mention of the class, or the class is mentioned, but specifies either a file of the wrong type or a file that can't be found. If possible, try to start the object's application. If the registry information is out of date or wrong, the application should check the registry and correct the information. If starting the application doesn't fix the problem, rerun the application's setup program.
|
Basically, Word has to be open for the macro to run successfully. Is there a way to open Word initially and then close it (programatically) once the macro is finished?