Programming Office
Reviews from Bill Coan, Microsoft Word MVP
Office 2003 Programming
Real World Applications
by Ty Anderson
Published by Apress
http://www.apress.com/book/bookDisplay.html?bID=343
Microsoft .NET Development for Microsoft Office
by Andrew Whitechapel
Published by Microsoft Press
http://www.microsoft.com/MSPress/books/7756.asp#AboutTheBook
If Ty Anderson and Andrew Whitechapel were professional wrestlers, they’d be standing in opposite corners of the ring, pointing fingers at each other and shouting insults. They would do this not because they have serious differences of opinion but because they have different perspectives on the world around them and that’s how wrestlers behave in that situation.
As it happens, Anderson and Whitechapel are professional programmers. They have different perspectives on the world around them, but this has led them each to write a thoughtful book about programming Microsoft Office.
Their books have almost nothing in common with each other:
- Anderson’s code samples are written in VB. Whitechapel’s code samples are written (with very few exceptions) in C#.
- Anderson’s book is organized around a series of business scenarios. Whitechapel’s book is organized around a series of programming concepts.
- Anderson’s book focuses exclusively on Office 2003. Whitechapel’s book covers Office 97 and later and provides separate code samples for each version of Office.
- Anderson’s book provides relatively little conceptual background on the principles of Office interoperability. Whitechapel’s book devotes multiple chapters to such principles.
- Anderson’s book is aimed at experienced VB6 and VB.Net developers who want to get something up and running with Office as quickly as possible in order to solve a specific business problem. Whitechapel’s book attempts to be language agnostic and is aimed at developers of all stripes who want to fully understand the options available to them and who appreciate knowing what’s going on under the hood.
In professional wrestling, two wrestlers can pair up to form a tag team and take on the world. In publishing, two authors can do something similar, but it isn’t always necessary, because readers can purchase both authors’ books and derive value from each.
As it happens, Anderson’s book and Whitechapel’s book are both solid contributions toward better understanding of Office programming. They make good companions and help compensate for each other’s slight weaknesses.
Whitechapel admits that in certain contexts VB.Net has five distinct advantages over C# for Office interop programming. He admits that it would be “simple enough to generate Visual Basic .Net code” for the samples in his book, yet he decided not to provide such code. Instead, he tried to “keep things simple,” apparently so that VB programmers could try to follow along with the C# samples that he did provide. Anderson’s extensive VB samples provide a point of comparison and help the VB programmer cement the concepts that Whitechapel covers in depth.
Anderson, for his part, skips over some of the ambiguities hidden from the user by VB.Net and leaves the reader with an ambiguous understanding of references, namespaces, and interfaces. Thanks to the sample code provided, the reader isn’t likely to be harmed by this, but Whitechapel’s book, with its more thorough conceptual material, helps the reader fully understand why Anderson sets up his code the way he does.
The sample applications in Anderson’s book include a tool that streamlines the process of creating presentations in PowerPoint; a com addin for creating and populating Word documents using data from Outlook; a com addin that automates generation of frequently used email messages in Outlook; a web service for notifying individuals of task assignments; a budgeting tool built using Excel vba; a time recording system for Excel built with Visual Studio Tools for Office; a smart tag interface to an Information Bridge Framework; and an ordering system based on a smart document in Word.
The concepts covered in Whitechapel’s book include Office interoperablility; integrating managed code with Office applications; Office addins; smart tags; Office documents and data; web services and remoting; Visual Studio Tools for Office; smart documents; and security.
Neither of the books directly addresses the plight of Office vba developers who want to explore Office interoperability or .Net managed code. Such developers are left to discover for themselves how code files and object libraries are organized in .Net, and how VB.Net syntax and C# syntax differ from vba syntax. Even so, vba developers who want to explore Office interoperability will find both of these books to be valuable additions to their libraries.
NOTE: The term “pile driver” isn’t mentioned in Anderson’s book or in Whitechapel’s book, but the two authors almost certainly agree with the rest of the civilized world that this wrestling move should be illegal. To the best of this reviewer’s knowledge, it is outlawed in seven U. S. states. It ought to be outlawed everywhere.