title: Safety of using Microsoft Outlook 14.0 Object Library DLLs
body: <p>In my C# program, I originally called an external VBS script to run some Outlook manipulation stuff (importing vCards into Outlook). I decided to change this though to straight C# code, due to the inelegance of using VBS, and a tricky to pin-down bug.</p>
  
  <p>First off, I used the Microsoft Outlook 11.0 Object Library. This seemed great on Windows 7, but then when I tried running the following line of code on Windows XP, it crashed: <code>var outlook = new Microsoft.Office.Interop.Outlook.Application();</code>. Obviously, I made sure that the Microsoft.Office.Interop.Outlook.dll and Office.dll files were in the user's folder along with the C# exe, but that didn't help. Bear in mind this is a .NET 3.5 Client Profile app.</p>
  
  <p>So then I tried using the 14.0 Object Library rather than 11.0 (I got version 14 from my other computer which has Outlook 2010 installed instead of Outlook 2003 (version 11) on my first PC). Instead of using MSOUTL.OLB now, I referenced the two aforementioned DLLs directly. It works, or appears to work perfectly now, even on XP.</p>
  
  <p>Some questions:</p>
  
  <p>1: Can I legally redistribute Microsoft.Office.Interop.Outlook.dll and Office.dll along with my program (same folder as exe), and if so is there any way to cut down the size from around 1.5meg other than compression?</p>
  
  <p>2: Is going this route (using Microsoft Outlook 14.0 Object Library) safe, and perhaps safer than using VBS on the end user's PC?</p>
  
  <p>3: Side question: What's the difference between referencing MSOUTL.OLB (i.e. the COM menu when referencing), and referencing the two DLLs (Microsoft.Office.Interop.Outlook.dll and Office.dll) directly. They both appear to do the same job (the former OLB one creates the DLLs anyway).</p>