Outlook 2003 Add-in with Visual Studio 2005?

Thinking of building an add-in for Outlook 2003 with Visual Studio 2005? Don’t do it. Really, don’t do it. What? Ok, if you must…

I’ve just spend the last three days building an add-in and installing on on a single PC. This totaled about 3 hours of development time and the rest was getting the darn thing to load! Honestly, it was the single most frustrating thing I’ve ever encountered in years.

The problem was that the setup program that Visual Studio 2005 automatically generates when you create an add-in project doesn’t include everything you need.

Here is how I fixed the problem:

Before you can load your add-in you need to make sure the following is installed:

After that you’ll need to "fully trust" your assemblies. This can only be done with signed assemblies. I remember being a pain with VS 2003 but turns out is a breeze with VS 2005. Just open up the Properties for the project and select the Signing tab. From there is was fairly self explanatory.

Now comes the part that gave me problems. After you have everything installed (including your nice newly signed assemblies) you need to give permission to those assemblies. This is done using a tool called CASPOL.EXE. Here is the command line for registering your file:

caspol -u -ag All_Code -url "<full path to your file>" FullTrust -n "<assembly name>"

If you have more than one file (or the above didn’t work) you can also do this for a directory.

caspol -u -ag All_Code -url "<directory path>*" FullTrust

I hope this helps save someone from the pain I experienced over the last few days. Hopefully this will get easier with the next release of Visual Studio…

Updated to reference Outlook 2003. I wasn’t clear about that in the original post.

Office 2007 Product Key Problems

Seems there is a bit of an issue with the MSDN Product Keys for Office 2007.

Several of the Office products share the same Product Key issued by MSDN; "Office 2007 Desktop Programs" is used for Groove. InfoPath, and OneNote and both Project and Visio share another one.

When I went to activate the assorted application on my workstation it failed for InfoPath, OneNote, and Project (Groove and Visio activated without a hitch). After some looking around I was able to find a thread in the managed MSDN newsgroups on this topic. Looks like several users have reported this problem.

My guess is that the licensing servers are unable to recognize which product is being activated and it assumes that you are trying to re-activate the same product again and again. They also don’t seem to know these are MSDN keys that should be allowed several installations (see MSDN Licensing FAQ)

I was able to get OneNote activated over the phone (it was the only application I needed ASAP) after I explained the problem. Of course your mileage may vary.

Update: This seems to have been fixed. Also, I’ve turned comments off due to people using the comments to request and publish product keys. Go pirate somewhere else guys.

Outlook 2007 Doesn’t Work with Exchange 5.5

Not that I’m really very surprised but Outlook 2007 will not connect to Exchange 5.5. I found a note about this on the TechNet Forums:

“Microsoft continuously strives to provide a consistent and predictable end-of-life-cycle experience for all of its products.  In accordance with standard Microsoft life-cycle policies Exchange 5.5 ended extended life-cycle support on January 10, 2006.  As a result, Outlook 2007 will not support Exchange 5.5.  Because neither the Outlook or Exchange team is supporting this combination we will not discover and/or fix issues that crop up as the result of innovations in both products .  Rather than subjecting customers to potential serious issues like data loss or frequent server downtime we choose to prevent Outlook from connecting to these older and now unsupported servers.  Our research has shown that there is a relatively small set of customers who want to upgrade their desktops to the latest and greatest versions of Office and run server technology as old as Exchange 5.5.  There are clearly exceptions but they don’t seem to be the norm.”

Something to keep in mind if, like me, you need to connect to an Exchange 5.5 email server.