I am trying to open a word file from a command button in excel. I've been trying to use:
However, this does not work. It opens word, and then an error box saying:
Word experienced an error trying to open the file. Try the following:
- check the file permissions for the document or drive
- make sure there is sufficient free memory and disc space
- open the file with Text Recovery converter.
I do not understand what this means - does anybody know what could be wrong? Or does anybody know another way to open a word file from excel?
Thanks
hwc535
Code:
filenam = "\filename.doc"
loc = activeworkbook.path
helpfil = loc & filenam
RetVal = Shell("C:\Program files\Microsoft Office\Winword.exe " & helpfil, vb normal focus)
However, this does not work. It opens word, and then an error box saying:
Word experienced an error trying to open the file. Try the following:
- check the file permissions for the document or drive
- make sure there is sufficient free memory and disc space
- open the file with Text Recovery converter.
I do not understand what this means - does anybody know what could be wrong? Or does anybody know another way to open a word file from excel?
Thanks
hwc535