Hey, how else were we going to do it?

Custom Office Programming and Automation
I was browsing the Internet recently and found a company that sells Outlook add-ins for various purposes (I won't mention the company). What a shame, because a few lines of VBA code could save dozens or hundreds of dollars that might be otherwise spent on frivolous add-ins that remind you if you forgot an attachment, or automatically BCC someone, or something similar. As long as you're OK with giving up a pretty UI (with the company's logo plastered on it, of course) and are willing to get into the trenches and debug your own code.
A visitors writes and asks "Do you have any code to read an Excel sheet and update Outlook contacts?"
So I whipped up the following code, and thought I would share it with anyone else who needs to create Outlook contacts in bulk, possibly as part of a larger application, filling in the most popular fields (name, email, company).
I've been enjoying the series of posts called What is Normalization over at Roger's Access Blog. If you get a chance, check it out, it's really great reading.
Today I've chosen to demonstrate how to programmatically create distribution lists from Excel.
Here is the last of the add-in code I was working on. This piece extracts the properties from Contact Items into Excel, using early binding to speed up the code, but with GetObject/CreateObject calls to attempt to hook into an existing instance of Outlook. What, do you mean you don't leave Outlook running all day while you're in the office?
Follow Me