Running the Outlook Mail control panel from the command line

Not sure why the internets failed me again, but I had to resort to registry searching to find this one. For Outlook 2007, to run the “Mail” control panel applet from the command line, use the following:

rundll32.exe shell32.dll,Control_RunDLL “C:\Program Files\Microsoft Office\Office12\MLCFG32.CPL”

I needed this so I could run the applet as a different user. Worked like a charm!

New Facebook Redesign is even worse than the last one…

I figured I should mention this outside of Facebook:

Facebook just implemented a redesign that is destined for epic failure (Unless they only really care about teenagers).

1. The “stream” is a terrible idea.
Most people I know check Facebook a couple times a day. They do not monitor it, they do not religiously check to see each and every status update their friends went through — they want to get an idea of what their friends are up to, see new pictures, maybe play games and post things.
The stream is chronological, and if you don’t check it in time, you will miss things. While I would say the previous news feeds system was a bit too quiet, this is just insane! A wall-to-wall conversation between two people I barely know used up the top 10% of my facebook home page!

2. Nobody cares what a person’s friends are doing when it doesn’t involve them.
Apparently, items that show up on your main page will also suw up on your profile page. Meaning that when two “friends” you barely know are having a wall-to-wall conversation, it might show up on YOUR profile.

3. Even more control taken away.
I am not interested in the Easter egg application, and I do not what to see it on my sidebar as a “courtesy.” I do not want to see things on my homepage from applications I do not use, or have not authorized. If I wanted applications, I’d go to the applications page. In fact, you no longer have any direct control over what shows up on the sides of your home screen. All you can do is effect the stream.

4. More flexibility is nice, but they totally failed with the status updates.
“Facebook is not Twitter”
I thought I wanted to be able to have a status that did not begin with my name. Now that I have it, I realize that I was wrong. Facebook is about people, and the status should be about the person posting it.
The biggest problem, however, is the fact that it is not longer truly a status. It’s just a post. A “tweet.” It shows up at the top of your “stream” until somebody else posts stuff and pushed it out. This of course motivates people to update their status more frequently, engouraging more junk.
If I want to post messages, I’ll use twitter. Or join a forum.

Facebook was like a more grown-up, relaxed, structured myspace. Now? Well, it just might be worse than Myspace. And I’n not interested in MySpace. Maybe LinkedIn can take over…

Site Cleanup

I’ve upgraded, relocated, reskinned and repaired Nucleus. The previous skin was created when 1024×768 was a pretty typical resolution, and looked downright silly. RSS feeds are finally working. The last remains of the multiple-blog setup have been removed. (Now if only I had time to convert to WordPress)

Maybe somebody other than my Mom will read it now?

Ok, maybe not.

Outlook 2007 add-in shenanigans

Here are three things I was unable to find any guidance for on the internets regarding working with Outlook 2007 in Visual Basic, so I made it up.

1. How do you tell if a folder is a contacts folder?
I still dont know if this is the correct way – I may not have found the right search terms, but this works.

Check the DefaultItemType property. If it is Outlook.OlItemType.olContactItem, then the folder is a contacts folder.

2. How do you make a toolbar context aware / context sensitive? That is, how do I have a toolbar that is only displayed when viewing contacts, or the calendar, but not email items?

You will need to create an event handler for the FolderSwitch event on the active explorer. In this handler, check the DefaultItemType of the CurrentFolder on the active explorer.

A code block is worth a thousand words:

Public Class ThisAddIn
  Dim ToolBar As Office.CommandBar
  Dim WithEvents expl As Outlook.Explorer

  Private Sub ThisAddIn_Startup(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Startup
    expl = Me.Application.ActiveExplorer
    ToolBar = expl.CommandBars.Add("ToolBar", Office.MsoBarPosition.msoBarTop, False, True)
    ToolBar.enabled = true
  End Sub

  Private Sub expl_FolderSwitch() Handles expl.FolderSwitch
    If expl.CurrentFolder.DefaultItemType = Outlook.OlItemType.olContactItem Then
      ToolBar.Visible = True
      ToolBar.Visible = False
    End If
  End Sub
End Class

3. How do you create a Distribution List (aka DistListItem) in a non-default, custom folder? (Or how do you set the parent folder on a newly created Distribution List)?

All the examples I could find for creating Distribution lists programmatically suggest using Me.Application.CreateItem(Outlook.OlItemType.olDistributionListItem) to create the DistListItem object. When you do it this way, it always adds the Distribution list to the default contacts folder.

Turns out, you can also use <folder object>.Items.Add(Outlook.OlItemType.olDistributionListItem). You should be careful that this is only done in a contacts folder (can you see how this is all coming together?).

So, if you want to create a new distribution list in the current folder (instead of the default contacts folder), add a person to it, then present it to the user to save or disgard, you could do the following:

  Private Sub createDistList()
    Dim dlist As Outlook.DistListItem
    Dim recip As Outlook.Recipient
    dlist = Me.Application.ActiveExplorer.CurrentFolder.Items.Add(Outlook.OlItemType.olDistributionListItem)
    recip = Me.Application.Session.CreateRecipient("John Doe <>")
  End Sub

I’ll let you figure out how to add the button, and create a handler for said button.

Hopefully this saves somebody some time. I find it hard to believe I’m the first person to try it…