Now that we have considered the basic pattern of the Office object models, let us consider how developers pattern and build their Office solutions. There are three patterns that most solutions built using Office follow.
• Office automation executable
• Office add-in
• Code behind an Office document
An automation executable is a program separate from Office that controls and automates an Office application. An automation executable can be created with development tools such as Visual Studio .NET 2005. A typical example is a stand-alone console application or Windows Forms application that starts up an Office application and then automates it to perform some task. To start a solution built this way, the user of the solution starts the automation executable that will in turn start up the Office application. Unlike the other two patterns, the automation code does not run in the Office process but runs in its own process and talks cross process to the Office process being automated.
An add-in is a class in an assembly (DLL) that Office loads and creates when needed. An add-in runs in process with the Office application rather than requiring that a separate process from the Office application is running. To start a solution built this way, the user of the solution starts the Office application associated with the add-in. Office detects registered add-ins on
Download pdf Visual Studio Tools for Office Sample Chapter
Related Searches: visual studio tools, office automation, office application, object models, visual studio tools for office
RSS feed for comments on this post · TrackBack URI
Leave a reply