Generating Active Directory Diagrams with Visio 2003 and Visual Studio .NET 2003

Last week we published a new Office Talk column: Generating Active Directory Diagrams with Visio 2003 and Visual Studio .NET 2003. I am very happy about this and I have to say that I had a lot of fun writing this article and code.

Everything started back in September at PDC when I met with a customer who asked how to build custom Active Directory Diagrams with Visio 2003. We talked about the possibilities and in general I explained how he could build an Active Directory diagram. Active Directory is one of my favorite topics :). When I came back to Redmond I met with my friend and peer Saul Candib, who is the programmer writer for Visio. We talked about the scenario and we decided to work together to build a code sample and a technical article that would help Office developers to learn how to:

  1. Connect and query an Active Directory from managed applications.
  2. Understand the fascinating ways in which you can use the Visio PIAs to create all sorts of custom visual solutions.
  3. How to build a Visio 2003 Add-in that generates a custom Active Directory Visio drawing.

Sample Active Directory user diagram generated in Visio

One important note for developers who are already working with Visual Studio 2005. The Visio 2003 SDK Add-in/Add-on wizard was designed for Visual Studio 2003, and that approach will not work with Visual Studio 2005. However, you can build a Shared Add-in (instead of using the Visio 2003 SDK Add-in/Add-on wizard) and everything will work just fine. Bill Morein, who is a Program Manager for Visio wrote this interesting blog entry where he explains how to create Visio COM Add-ins with Visual Studio 2005.

I hope that you enjoy this article and find it useful if you are one of those developers who are currently looking for options to build custom Visio 2003 solutions. I can say that Saul and I were really happy to put this together and we would be quite pleased to know if you liked it :-).

Have a peek and enjoy!