Visual Studio Tools for Office: Using C# with Excel, Word, Outlook, and InfoPath【3】

Introduction
In 2002, the first version of Visual Studio .NET and the .NET Framework is nearing completion. We are aware of several of Microsoft's .NET will miss Office, unless we do something.

Used to be Visual Basic for Applications (VBA), which is a integrated into all Office applications in a simple development environment. Each Office application has a rich object model, called by the COM technology access. Millions of developers to define themselves as "Office Developer," and the use of VBA and Office COM object model, from the automation of repetitive tasks to create a complete business solution that leverages Office of the rich features and user interface. These developers realize their users spent the day at the Office. By building solutions running inside the Office, they not only customer satisfaction, but also by reusing functionality in Office applications already available, create more, lower cost solution.

Unfortunately, due to some limitations of VBA, Office programming starting to get a bad review. VBA by small working groups or individuals to develop solutions that will gain momentum, professional developers will have to take measures to begin to support them. For professional developers, VBA environment feels very simple and limited, of course, it also implements a single language: Visual Basic. VBA code is embedded in each custom document, which makes it difficult to fix the errors and update the solution, because the error will be replicated throughout the enterprise document. VBA model of security breaches led to business to the VBA macro viruses and worms off.

Visual Studio .NET and the .NET Framework provides a solution to all these problems. There is a huge opportunity not only will the richness of the new .NET Framework with Office and developer tools for developers has been to provide a powerful platform combining addresses the issues that plagued the VBA. This result is achieved Visual Studio Tools for Office (VSTO).

The first version of VSTO is very simple, but it implements for professional developers to use the full functionality of Visual Studio .NET and the .NET Framework will target key code in Excel 2003 and Word 2003 documents and templates. It allows professional developers to build Office solutions in VB.NET and C #. It is linked to the document by the .NET assemblies rather than embed it into a document to solve the problem of embedded code. It also introduces a new security model using .NET code access security to prevent worms and macro viruses.

The second edition VSTO, known as VSTO 2005, this book covers more ambitious version of VSTO. It brings the functionality of Office developers were previously unavailable, such as design data binding and data / view separation, Visual Studio Excel and Word documents in view of the time, rich support for document Windows Forms controls, the ability to create custom Office task pane, support for server-side programming Officeand, and this is just scratching the surface. While the main objective is to VSTO professional developers, but that does not mean using VSTO to build Office solutions is rocket science. VSTO can create very rich applications through a few lines of code.

This book tries to use all the information VSTO successful in one place, in order for Word 2003, Excel 2003, Outlook 2003 and InfoPath 2003 program. It introduces the Office object model and the object model covering the most commonly used objects. In addition, this book will help you avoid some of the pitfalls origin Office COM object model generated.

The book also provides a feature-rich point of view VSTO all insiders. We are involved in many of the design and implementation of these functions. Therefore, we can speak from the past three years of life and VSTO unique angle breathing. Using VSTO programming office powerful and interesting. We hope you enjoy using VSTO, as we like articles, and create it.

Eric Carter
Eric Lippert

 

May 2005

Guess you like

Origin www.cnblogs.com/qiys/p/11367288.html