tags:

views:

130

answers:

2

I need to use Outlook Interop objects for generating .MSG files from a web interface. That's why they will be accessed simultaneously by different threads. Is it multithreaded?

And another question: Does Outlook need to be initialized (e.g. account set) before using Outlook.Application on a server?

+3  A: 

As far as I know none of the Office API's were designed to work on the server side, only at the client side.

Otávio Décio
what is better way of creating '.msg' file? Using IStorage interface?
Yurec
Redemption might be able to help you out here, or have you thought about EWS exchange dav?
76mel
+3  A: 

The simple answer to your question is No.

Don't go down the automation route, Office applications are not designed to be used within a non-user interactive environment or to be ran on a server. Microsoft have posted quite a long knowledge base article on this detailing problems from security, scalability etc.

Previously this hasn't been a problem and people have gotten away with it, just ignoring the advice. However you'll find that the newer operating systems (vista/server 2k8/win7) and new versions of Office simply don't work anymore. I highly recommend not going down that route.

Ian
+1: A component at my office went down this route a decade or more ago. The poor people in charge of maintaining it still regularly run into problems that can be either directly or indirectly attributable to running office via non-interactive automation. And that's just doing it via Task Scheduler.
Greg D