On Wed, 1 Dec 2004 13:17:05 -0800, s_cnot <sc***@discussions.microsoft.com> wrote:
¤ I wanted to use a new Thread to open Excel.Application 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.Application 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******@ameritech.net
Microsoft MVP (Visual Basic)