On Wed, 1 Dec 2004 13:17:05 -0800, s_cnot <sc***@discussi ons.microsoft.c om> wrote:
¤ I wanted to use a new Thread to open Excel.Applicati on in my web project and
¤ it gave access denied. If I do not use a new thread, i.e NO thread.start(),
¤ then this Excel.Applicati on instantiation is fine.
¤
¤ Any ideas ? Thanks
It's probably because Office apps are not designed to be used with multiple threads. They operate
off the main UI thread which runs in an STA (single-threaded apartment).
This is the main reason why Microsoft does not support the use of automation with Office
applications from unattended non-UI processes such as web server or service based applications.
Paul ~~~
pc******@amerit ech.net
Microsoft MVP (Visual Basic)