Office 2010 Solutions Module and Add-in Express 2010
I’m sure a lot of us use MS Outlook as our primary application when developing solutions hosted on the MS Office platform or when doing simple productivity enhancing add-ins. Using Outlook is an obvious choice, think about it. It is probably one of the few applications users always have open and use constantly each and every day. So naturally it was Northwind Traders’ (our fictional client for this development) number one choice as the primary application for their Customer, inventory and order management system.
If you have been developing MS Outlook Add-ins for a while, you most probably would have loved to have the ability to add you own pane /page to the left hand navigation pane. Unfortunately that request was something of a holy grail for Outlook developers prior to Outlook 2010. To work around that requirement, Outlook developers had to add their own folders to the existing navigation pane items. This worked to an extent but, speaking from experience, did confuse the users a bit on why there is a Northwind sub folder in their Inbox, and even worse if they already had a folder called Northwind, the add-in did unexpected things.
Well, something I am very excited about in Office Outlook 2010 is the new Solutions Module. This little gem allows developers to add their own pane /page to the Outlook 2010 Navigation Pane. Now, before you get too excited, this is only as long as it contains built-in Outlook items, e.g. calendar, tasks, mail and contacts.
Using Add-in Express 2010 Beta 2, I’ll show you how easy and quick it is to add you own Solutions Module. Let’s get started! Create a new ADX Add-in project or open your existing Northwind project.
Make sure you have the AddinModule designer open, and add a new ADXOLSolutionModule to your designer by either clicking on its toolbar button or selecting it from the designers’ context menu. In case you can’t find it, here’s an image:
Next, select the Solutions module component and click on ellipse (…) button next to the Folders property. Click on the Add Folder toolbar button as shown in the following image:
Change the FolderName property to Northwind and the FolderType to Notes. As you can see you have a list of the built-in Outlook items to choose from. Feel free to change the Image property if you want, then build and register your project.
Start-up Outlook and take a close look at the navigation pane. Notice a new item? If not, you might have to resize the navigation pane or select “show more buttons”. If all went well, your navigation menu should look something similar to this:
You can set the location where the new item needs to be shown in the navigation pane by specifying the NavigationPanePostion property. Here is a screenshot of the result of setting the property to 1:
Let us quickly go back to the AddinModule designer and add a few more folders according to the following structure:
- Product Categories
We’re going to use our own UI, so don’t worry too much about specifying the FolderType. The layout should look something like the following (I’ve added my own images for artistic effect):
As mentioned previously, the Solutions module only supports the built-in Outlook items. You’ll notice when you click on Contacts, it will show you a standard Outlook Contacts item view. In this case we want our own forms to show. For example the Orders/Invoices should show the users a form to add /edit and search orders and invoices. Of course, we can accomplish this by using Add-in Express’ Outlook Forms Manager.I just want to stop right here, and highlight a “gotcha” with the Solutions module. If you go into Outlook and click on the Folders view, you will see the folder structure you’ve created under your Personal Folders or root folder (Thanks Dmitry for pointing me in the right direction!). Keep this in mind when you need to access certain folders in your Solutions module. Here is an image of what I mean:
OK, let us now add a new ADX Outlook Form item to your project and a new Outlook Forms Manager component to your AddinModule designer by clicking on the ellipse (…) button in its Items property. Click the Add button and set the ExplorerLayout property to WebViewPane. Set the FormClassName to the ADX Outlook Form you’ve added and specify the FolderName property. In my example it is Personal Folders\Northwind\Sales\Orders.
Add any controls or logic you need onto the ADX Outlook Form, then build and register your project. Open Outlook and click on the Nortwind item in your navigation pane. If everything goes well, you should see something similar to this:
How cool is that? Fine it is just a fancy view on a folder in your Personal Folders, but none the less, it will give your add-in a more professional look.
Thank you for reading and until next time, keep coding!
You may also be interested in: