OfficeDeveloper Now on Twitter

I’m thinking this Twitter thing just might catch on with people…

I now have a Twitter account that goes with this blog.



Build a Collapsible Task Pane in Outlook – Part 2

In part 1 of this series I gave a (brief) overview of the Outlook Task Pane and provided a couple of links to articles on MSDN that explain how to build one.

Recap – 2 Problems with Task Panes within Outlook

Building a task pane and displaying it within Outlook is easy but as I mentioned in Part 1, there are a couple of problems:

  1. Managing the multiple Task Pane instances, attaching to the Explorer and Inspector windows, and destroying each task pane when its Explorer or Inspector windows closes can be a pain.
  2. The task pane you build does not come with an “collapse” button. You know, the button with a couple of chevrons pointing in the direction it will collapse? You have to add this functionality yourself. It can be done but there are easier methods.

This brings me back to the point of this series, Add-In-Express 2009 (ADX). This tool takes care of Issue #1 and. Issue #2. Yes, ADX costs a few bucks but it’s a time-saver and it reduces development effort. Either one of those is typically reason enough for me to purchase a tool (especially if the client is paying for it).

Quick Overview of the Design for the Collapsible Task Pane

By collapsible, I mean it can be "minimized" so that it resembles the collapsed state of the ToDo Bar. The task pane has a “collapse” button and resides between the mail preview window and the ToDO bar within Outlook Explorer windows.

Here is the design for the sample add-in I will build in Part 3:


The task pane displays exactly where it should. You can see the collapse button on the upper right-hand corner of the task pane. When the user clicks that button, they will see something like this image:


In this collapsed-state, only a vertical bar displays with an “expand” button. Clicking the expand button will return the task pane to its open state.

Preview of Part 3

Next-up, I’ll dig into the code and actually build the add-in. Also, I’ll decide on what to display within the task pane besides a lame button. Not to worry, I’ll think of something useful to put there and it will be code you can steal…put to use today.

Build a Collapsible Task Pane in Outlook – Part 1

I believe Outlook is the informational portal to business users everywhere. As the desktop interface to Microsoft Exchange, Outlook effectively serves as the short-term and long-term memory of the individual user…the brain if you will. I feel comfortable calling Outlook my brain as I have only a limited short-term memory and virtually no long-term memory.

If I don’t get an important date on the Outlook Calendar or create a task for something I need to do…forget it. It won’t happen. If I delete an email instead of filing it away within my insanely intricate and highly detailed filing system, it is like you never emailed me at all.

My point, is Outlook contains the details of my life…both professionally and personally. It is vital to what I do and how well I do it. I’m obsessed with keeping my information organized and using this order to execute on a daily basis. I’m not what you might call “anal”. I don’t naturally have orderly tendencies. This fact only serves to point out the genius that is Outlook.

Outlook Provides Developers With a Portal to Business Users

As a developer, my love for Outlook has only increased. The Outlook object model is extensive, allowing developers to build Outlook add-ins that automate the workflow and info-flow (best I can tell, I just coined that phrase…I claim it) of their users.

When Microsoft released Outlook 2007, I was immediately drawn to the integration of the ToDo Bar into the main email window (see below).


I love that I can view my upcoming appointments along with my task list in the same window that I manage email. Ever since I first saw the ToDo Bar, I wanted to build a similar type of task pane. I found that it is indeed possible but it is a complete PITA. The issue comes down to manage your custom task pane instances and tracking to which Outlook Explorer or Outlook Inspector window they belong.

You can do manage the task panes by following the guidance available here:

Walkthrough: Displaying Custom Task Panes with E-Mail Messages in Outlook

Or you can take an easier approach and download the VSTO Power Toys and make use of the Office Custom UI Manager. Either way, write code to manage the task panes. In fact, I wrote about it in my book, Pro Office 2007 Development with VSTO.

Task Panes Made Easy with Add-In-Express

Both of the example just mentioned make building & managing custom Outlook task possible. But an much easier method exists. In fact it requires virtually no code. The rub is you need to look beyond the toolset provided by Microsoft. This tool is Add-In-Express 2009 (there are two versions, one for VSTO-based solutions and another for COM-based solutions)

Add-In-Express (ADX) can handle it all, allowing you build custom CommandBars, Ribbons, Outlook Property Pages, Form Regions, and much much more. In fact, they extend the possibilities of such things like form regions, allow you to place them in other locations besides the bottom of an Outlook form (see below):



I first discovered ADX when building a solution for one of the major banks in the USA. That project required that we integrate Outlook with a custom CRM solution involving Exchange, Oracle, and Java web services. Using ADX, I was able to quickly build out the required Outlook Task Panes.

A Preview for Part 2

That’s it for now. I decided to break this article up into a series of posts. I originally planned to cover it all in a single post but kept procrastinating because I didn’t want to write a full-fledged article in a single sitting. So I’ll stop here with a quick intro of Outlook task panes and Add-In-Express. In, Part 2 of this series, I’ll cover the design for a sample add-in that will serve as the basis for a solution I’ll create with Add-In-Express 2009.

It’s About Time! Outlook 2010 Will Support Multiple Exchange Accounts

outlook2010I have always wanted to use multiple Exchange accounts within Outlook without setting up multiple profiles. It looks like Microsoft is set to make life a bit easier for me and 1000s of others.

Check out the news from the Outlook team’s blog.


One caveat is that Outlook 2010 will only support 3 Exchange accounts. Still, 3 is better than one…for lots of things…like say, chocolate chip cookies.

Speaking at Dallas SharePoint Developer Group

I will be taking my international road show just down the street to speak at this month’s Dallas SharePoint Developer Group meeting.


I’ll be covering How To Integrate Sharepoint With Office And Line-Of-Business Applications.

What I plan to do is show-off how to use Office as the front-end to solutions that work with SharePoint.


For fun, I’ll show how to integrate data from a sales database as well as an accounting program.

It will be fun. And if it isn’t…well, at the least there will be pizza. Never hurts to serve food at these things to keep everyone happy.

Learn How to Customize Outlook’s User Interface (attend my session at Tech-Ed)


Next week I am presenting a session at Tech-Ed that shows off a few cool techniques for customizing Outlook. I’ll presenting with one a fellow Cogent Company cohort, Damon Armstrong.

If you are interested in customizing Outlook and want to learn how to customize its UI then you don’t want to miss this session. We’ll cover the basics while implementing a business process that allows us to show more advanced techniques.

In fact, we’ll show you to do this:


Trust me you want to attend…especially because you learn just how simple a solution like this can be.

Below is the full session abstract copied from the official Tech-Ed 2009 site.

See you in LA!

OFC325 Building Custom Applications in Microsoft Office Outlook 2007

Ty Anderson, Damon Armstrong

Tue 5/12 | 2:45 PM-4:00 PM | Room 408A


300 – Advanced, Breakout Session, Developer, Developer Manager, Microsoft® Office Suites, Office and SharePoint, Solutions Architect, Yes, Yes

This session covers strategies for customizing Outlook for your unique business requirements. The session covers how to build task panes (for Inspectors and Explorers), form regions, custom Ribbons, and more. A real-world business scenario is used to provide context as each demo builds upon itself to show how each UI component can work with each other. In addition, other features like data storage, views, and search are covered.

The Office 2019 Video is Irrelevant

I have tried to ignore all the hubbub regarding this silly video about what Microsoft Office could be like in 2019.

I finally watched the video and thought if all the concepts displayed become a reality that would be just spiffy.

But to be perfectly honest, I find the video to be an exercise of mental masturbation. Sure it stimulates the mind, but what good does it really do you?


Some folks at MSFT (most likely the marketing team) have their heads in the clouds partying like its 2019. The video strikes me as completely irrelevant to what Microsoft’s customers are experiencing today…an out and out struggle for survival today…2019 will take care of itself.

Today’s recession is kicking our tails. If it hasn’t hit you, it most certainly has hit a friend or a neighbor. What concerns most of Microsoft’s customers is taking the required action to survive the next few years. If this is the message MSFT has to offer, it’s a big mistake.

"I can’t take any more news about that damn video. It’s stupid and MSFT’s marketing team should work overtime to counter act its messaging" 


(after the video arrived in my RSS feeds for the umpteenth time.)

How about today? How will Office 2007 or the upcoming, but delayed, Office 14 be effective at :

  • lowering my operating costs?
  • managing my finances?
  • tracking my inventory?
  • improving my communication (both its speed and quality)?

    Concepts are fine and dandy but if the message isn’t made personal by telling you how it will benefit you personally, it is lost. I hate to say it but Apple understand this rule of marketing. I offer their Mac vs. PC ads as the primary example.

    It Isn’t All Bad – The Concepts are Cool

    I do realize the video is (probably) meant to inspire us. In fact, I didn’t see anyone type anything. If I don’t have to type in 2019, sign me up!

    I also liked the digital wallet thing-a-ma-jiggy (at the 0.43 minute mark).  If they could make a version today that provided bailout cash on-the-fly I’d max a credit card or two to get one.



    I am fan of Microsoft and I believe they have the best platform for home and business. I hate to see them creamed when it comes to marketing but I am accustomed to it and I don’t think it will change anytime soon.

    Invest 5 Minutes and Learn about VSTO Frequently Asked Questions


    The Ins-and-Outs of VSTO Can Be Confusing

    Developing solutions with Microsoft Office using VSTO can be difficult as it isn’t as straight-forward as targeting a version of the .NET Framework to support and then proceeding with all the activities involved with developing a custom solution.

    Nope. If you are targeting Office, you are potentially dealing with several versions of Office. If so, then you could be dealing with multiple versions of VSTO. And if so, then you are dealing with multiple strategies for dealing with your VSTO solution’s deployment and security.

    VSTO is great and I use it as often as I can but it can be a mess to coordinate all the overlapping components of Office, Visual Studio, and the .NET Framework. Keeping all the details related to the various scenarios of when to use what is difficult. In fact, my notes are sometimes indecipherable.

    So I am glad to have found an FAQ on MSDN’s VSTO forum that provides answers to complex situations you will encounter when using VSTO to build Office add-ins.

    The VSTO FAQ on MSDN

    Here is the link to Visual Studio Tools for Office (VSTO) FAQs

    This FAQ includes answers to such questions as:

    1. How many versions of Visual Studio Tools for Office (VSTO) are there, and what are the differences between them?
    2. What are the similarities and differences between Shared Add-In and VSTO application-level Add-In?
    3. Why doesn’t my VSTO add in load after the deployment, but works on my development machine when debugging in Visual Studio?
    4. How to get the location of the custom task pane when it is floating?
    5. What registry entries in the client machine are needed when an Add-In is deployed?
    6. and 14 more….

    If you are new to VSTO or even if you are an experienced VSTO developer, this site is worth the 5 minutes it will take to read over the FAQ.

    Use VBA To Reset Task Due Dates in Outlook

    There was an earlier version of this post. It had more words and as it went on and on about how I track damn near everything in Outlook. It’s true. Everything. If I don’t track something I want to do or have to do as an Outlook task, it won’t get done.

    I deleted that post by accident as I thought I was deleting something else. As it turns out, the wrong Window had the focus when I hit the Delete button and I deleted this post. Dammit!

    Anyways, I always fall way behind on the deadlines I set for my tasks. So each Monday morning, I set the deadlines to a week from the current day.

    Here is the VBA code to achieve this.

    Sub ResetTaskDeadlines()
        Dim ns As NameSpace
        Dim fld As Folder
        Dim task As TaskItem
        Dim items As Outlook.items
        Dim rest As Outlook.items
        Dim filterSQL As String
        Set ns = Application.GetNamespace("MAPI")
        Set fld = ns.GetDefaultFolder(olFolderTasks)
        Set items = fld.items
        filterSQL = "@SQL=" & """"
        filterSQL = filterSQL & "{00062003-0000-0000-C000-000000000046}/"
        filterSQL = filterSQL & "81010003""" & " <> 2"
        Set rest = items.Restrict("[Status] <> 'Completed'")
        For Each task In rest
            ''task.DueDate = "1/1/4501" 'Set to NO Due Date
            ''task.DueDate = task.DueDate + 7 ' Set to 7 days from current due date
            task.DueDate = today() + 7 'Set to a week from today
            ''task.DueDate = FirstDayOfNextMonth ' Set to first day of next month
    End Sub
    Function FirstDayOfNextMonth() As Date
       Dim d As Date
       d = Date
       FirstDayOfNextMonth = DateSerial(Year(d), Month(d) + 1, 1)
    End Function

    I pretty much use VSTO to build Outlook add-ins professionally. But for quick personally useful scripts like this, VBA still reins.

    How Do I: Setup and Configure the Excel Data-Mining Add-in?

    New video on MSDN…

    This video shows how configure to setup the Data Mining Client For Excel addin. This addin is part of the Microsoft SQL Server 2008 Data Mining Add-ins for Microsoft Office 2007 download available at:

    Here is the original post:
    How Do I: Setup and Configure the Excel Data-Mining Add-in?