2007-06-14

Developing Office Add-ins the Easy Way - Part 1 of 2 (AKA: Blah, Blah, Blah...)

Well, I first started thinking of doing this post in April, then, earlier in May, I thought of contacting the component vendor asking them for a special discount coupon that I could give you, the reader of this blog. They promptly gave me one that was good until the end of May, but, as you may suspect by now, I didn't have the time to make the post. Well, things are a bit easier now with Windows Live Writer, so I'll try to make this post today (edit: I finished this several "todays" after starting!). (And don't worry, I talked with them and they extended the coupon's validity to the end of June!...)

So, how does one create an Office Add-in the easy way? Well, you cheat! :)
Actually, it's no more cheating than using database access components to access a, (you guessed!) database... I've been using AfalinaSoft's Add-In Express components in the last 18 months or so, and all I can say is that it's child's play doing any office Add-In development, be that Word, Excel, PowerPoint, Publisher, Visio, etc... I've created some Excel add-ins for my own use just because it was so easy to do them, rather than coding in VBScript! Outlook is very well represented in this lot with very cool features available for it as you'll see later in this post. Some new features added in the 2007 version allow you to add new form regions allowing you to create some great outlook add-ins with very little effort! (Note: that's 2007 version of the components, not of Office! All the features and the tutorial in the next part work the same from Office 2000 to 2007!)

Today's Add-In (I don't imply I'll be adding more, but one never knows as it's really easy to do them!), is a small Outlook Add-in that will show a collapsible pane in the messages list to show you the full Internet headers of the selected e-mail. You can shrink/expand/collapse this pane at will and, due to the way things work in Outlook, it's available for all mail folders except the Outbox. I've had to explicitly exclude that one after I found out that, if I select a message pending delivery, it would cancel delivery of that message: kind of what happens if you double click a message in the outbox and don't hit send again. No big deal: after a mail to the excellent Afalina support, I had a simple way of excluding just that folder (or any other I could want to exclude).

So, what do you gain by using Afalina's Add-In Express instead of doing it the hard way?

  1. A very well though out and tested component suite.
  2. You can easily follow a couple steps in a wizard, add a few lines of code and have an add-in ready in minutes, not hours.
  3. For the most part (there are a couple minor things to take into consideration), you get not to worry if your add-in is going to be used in Office 2000/XP/2003/2007 and wether or not those are running the default install or SP1 or SP2 or whatever.
  4. If you plan on going the .NET way in the future, they have the exact same components available for .NET.
  5. Deploying your add-in for non-.NET versions is easy: if you don't use packages, all get's compiled onto your main project (DLL), so it's a simple file to distribute/register/whatever.
  6. Many examples of different add-ins for different office applications are available.
  7. If you purchase the higher version (Premium), you get the full source code, including designers and wizards.
  8. Again, for the highest version you can even have instant messaging access to the developers; for other versions, normal e-mail and web-forum based support is provided and still they answer questions promptly.

Now, before you read any further, I must point out three flaws of this component suite, even though they are minor flaws as I'll explain later:

  1. No trial version
  2. Requires Activation
  3. No help file

Why do I say they are minor?

  1. You have a no questions asked 30 day money back guarantee (for the non-source versions) : I recommend you start with Standard version or Basic if you're on a short budget, and later, after you decide you will keep it, contact them for upgrade pricing for the source-code versions. I started with Basic myself, over 18 months ago, and have since upgraded to the Premium for the source code and added support.
  2. In the Premium version you get the whole source, even for the designers and wizards, so even if they somehow get out of business, you are not prevented from installing these components; also, you can install these on up to three machines, so you can install it on a Virtual Machine to have ready as a fallback procedure.
  3. They provide an easy to follow start up manual, they also provide both in the installer and in their website a plethora of demo add-ins, they have a very active and friendly forum, and tech support is among the best I've found for any component suite. In fact, should you get the Premium package, you can even contact them through instant messaging!

As for the coupon code, if you purchase the Basic or Standard versions (no source code included), you can use this coupon for a 20% discount until the end of June 2007: ADFXM20

Remember that, even using this coupon, you will still have the 30 days from date of purchase to return the product for the price paid should you not be happy with it.

You will need the Standard version if you want to take advantage of the advanced forms feature as described in the next post. As for later, once you decide you want to keep these components and no longer need to take advantage of the money back guarantee, I'd recommend you to upgrade to either Pro or even better, Premium, not only for the full source code but also the added support. Contact them and they'll upgrade your license for the difference between the purchased and wanted versions.

Now, with a very lengthy post already, it's time to start explaining how easy it is to create an outlook add-in to display the selected message's headers in another pane. When I started trying to create this demo application, I needed access to some message properties that I wasn't finding through the outlook object model, so I e-mailed them my question and very promptly (next day, IIRC), they sent me, not only the answer to my question, but a few Pascal units with the translated Extended MAPI and a sample project that addressed my problem! I received similar help from them later on when I couldn't find a way to exclude just one folder (outbox) from the folders where the add-in's pane would show and I mailed them the project with my question and they returned me the updated project with a few lines of code added and a short explanation of what was done. It's not as instant as a help file, but it sure is a lot more flexible!

I was thinking of doing a Video, but not only I'm on a short budget now and the free solutions I tried didn't inspire me, but it's also easier to copy/paste this and print it out for reference, should you want to follow along!

Part 2, which I'm writing right now, will be posted a few seconds after part one: I decided to split it so it's not such a big article and because you can thus print that 2nd part and use as a follow along should you want to try it out.

No comments: