G
Guest
I am trying to open a specific Word file from excel but It doesn't work when i use GetObject
I can get word to instantiate when i use CreateObject, example
Set Wrd = CreateObject("Word.Application"
Wrd.Visible = Tru
but beyond that I can't get the neccessary file to load. I tried using
Set Wrd = GetObject(MyFilePath, "word.application")
where MyFilePath is a string with the file path and file name. But I get error # 432: "filename or class name not found during automation operation". And if i try it without using a class name, because the documentation saids it should default to the proper class based on the file name's extension, i get nothing.
can someone who is familiar with this please help. Thanks
I can get word to instantiate when i use CreateObject, example
Set Wrd = CreateObject("Word.Application"
Wrd.Visible = Tru
but beyond that I can't get the neccessary file to load. I tried using
Set Wrd = GetObject(MyFilePath, "word.application")
where MyFilePath is a string with the file path and file name. But I get error # 432: "filename or class name not found during automation operation". And if i try it without using a class name, because the documentation saids it should default to the proper class based on the file name's extension, i get nothing.
can someone who is familiar with this please help. Thanks