Okay Im stuck

Im using system.diagnostics.process to launch certain applications and files from within my application. Now this works fine.

But im also using processname to identify which application gets opened when a file is selected. This all works fine on all files excpet for MS word. Well sometimes it works but most times it doesnt. I get an error saying that no process is associated with this file. The fact that it works sometimes...usally just after my pc has restarted....makes no sens....

If anyone has any idea...please help

Thanks

Fasan

Hi,

It is difficult to say anything w/o seeing the code but as you know Word application is a COM Automation Server and every documents opened are too. If you have a Word application open even there is no document open in it, when you click a .doc file the already working Word Application is used and no new process is created. Check wether the same happens w/ Excel too, and check wether you can avoid this bug by closing all open Word documents and the application.

Loren Soth

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.