I am trying to write a function that will open a file based on its application name, which is stored in a table.
This one works fine:
Function GetExcelPath()
MsgBox Excel.Application.Path
End Function
but when I run this one, I get "Run-time error '429' ActiveX component can't create object"
Function GetWordPath()
MsgBox Word.Application.Path
End Function
I do have references set to microsoft Word 8.0 library, so I don't know what the problem is.
This one works fine:
Function GetExcelPath()
MsgBox Excel.Application.Path
End Function
but when I run this one, I get "Run-time error '429' ActiveX component can't create object"
Function GetWordPath()
MsgBox Word.Application.Path
End Function
I do have references set to microsoft Word 8.0 library, so I don't know what the problem is.