I have a C# project, where I would like to access MS outlook, if it is installed on a client´s machine. The "access outlook" part has been done by referencing the outlook COM object, and going from there. My problem is now the "if it is installed" part. At the moment, my project doesn´t compile on machines without outlook installed, so I assume that I will have to not reference the outlook component, and instead load and use it dynamically, after detecting that outlook is present, but I haven´t found a way to do this. Am I correct, and does anybody have any hints on how to do this?
Thanks.
Edit: Resolved. Following the advice given by Hans Passant in one of the comments about using the office PIAs, proved to be the path of least resistance. I had a little difficulty getting the PIAs on my office-less machine, but it was overcome using the accepted answer to this question.