I'm using VBA for creating an instance of word currently by adding a reference to the library, but this cause an issue, because there existing some machines without word.
This cause instantly a runtime error at startup on these machines. It's not possible to catch this error.
However, I try to create an object in VBA on the fly by something like this
Dim oWshShell As WshShell
Set oWshShell = New WshShell
' *** TEST REGESTRY
Dim tmp As String
tmp = oWshShell.RegRead("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\15.0\Word\Options\PROGRAMDIR")
Debug.Print tmp
tmp = tmp + "winword.exe"
Dim oWord As Object
Set oWord = Shell(tmp)
But my problem is that oWord is not an Object of Word.Application. So how to handle this?
Would be nice to get available all functionalities like with Word.Application.