I'm having this kinda annoying problem.
I've an OLE Word object on my form, and then I also have the ability to open some documents using the ShellExecute command.
The problem is everytime I press the button to open a word document using ShellExecute the same instance of Word that's being used by the OLE object will be used. This means if I then close MS Word the OLE object will lose it's reference and I'll get an error "The remote server machine does not exist or is unavailable"!!
Now I found out this is a bug:
that has no apparent solution if you launch a document directly from windows explorer(wich seems to be exactly what ShellExecute does).
Anyone has/had this problem and have any ideas at all on how to solve it?
I really need to use ShellExecute because not all the documents are in .doc format.
Thanks.
I've an OLE Word object on my form, and then I also have the ability to open some documents using the ShellExecute command.
The problem is everytime I press the button to open a word document using ShellExecute the same instance of Word that's being used by the OLE object will be used. This means if I then close MS Word the OLE object will lose it's reference and I'll get an error "The remote server machine does not exist or is unavailable"!!
Now I found out this is a bug:
that has no apparent solution if you launch a document directly from windows explorer(wich seems to be exactly what ShellExecute does).
Anyone has/had this problem and have any ideas at all on how to solve it?
I really need to use ShellExecute because not all the documents are in .doc format.
Thanks.