Visual Studio Tools for Office 2007 VSTO for Excel, Word, and Outlook

by ;
Edition: 1st
Format: Paperback
Pub. Date: 2009-02-24
Publisher(s): Addison-Wesley Professional
List Price: $59.99

Rent Book

Select for Price
There was a problem. Please try again later.

New Book

We're Sorry
Sold Out

Used Book

We're Sorry
Sold Out

eBook

We're Sorry
Not Available

How Marketplace Works:

  • This item is offered by an independent seller and not shipped from our warehouse
  • Item details like edition and cover design may differ from our description; see seller's comments before ordering.
  • Sellers much confirm and ship within two business days; otherwise, the order will be cancelled and refunded.
  • Marketplace purchases cannot be returned to eCampus.com. Contact the seller directly for inquiries; if no response within two days, contact customer service.
  • Additional shipping costs apply to Marketplace purchases. Review shipping costs at checkout.

Summary

Visual Studio Tools for Office 2007: VSTO for Excel, Word, and Outlookis the definitive book on VSTO 2008 programming, written by the inventors of the technology. VSTO is a set of tools that allows professional developers to use the full power of Microsoft Visual Studio 2008 and the .NET Framework to program against Microsoft Office 2007. This book delivers in one place all the information you need to succeed using VSTO to program against Word 2007, Excel 2007, and Outlook 2007, and provides the necessary background to customize Visio 2007, Publisher 2007, and PowerPoint 2007. It introduces the Office 2007 object models, covers the most commonly used objects in those object models, and will help you avoid the pitfalls caused by the COM origins of the Office object models. Developers who wish to program against Office 2003 should consult Carter and Lippertrs"s previous book,Visual Studio Tools for Office. In VSTO 2008, you can build add-ins for all the major Office 2007 applications, build application-level custom task panes, customize the new Office Ribbon, modify Outlookrs"s user interface using Form Regions, and easily deploy everything you build using ClickOnce. Carter and Lippert cover their subject matter with deft insight into the needs of .NET developers learning VSTO, based on the deep knowledge that comes from the authorsrs" unique perspective of living and breathing VSTO for the past six years. This book Explains the architecture of Microsoft Office programming and introduces the object models Covers the main ways Office applications are customized and extended Explores the ways of customizing Excel, Word, and Outlook, and plumbs the depths of programming with their events and object models Introduces the VSTO programming model Teaches how to use Windows Forms and WPF in VSTO and how to work with the Document Actions Pane and application-level task panes Delves into VSTO data programming and server data scenarios Teaches ClickOnce VSTO deployment This is the one book you need to succeed in programming against Office 2007. C# and Visual Basic .NET Code samples for download can be found here: http://www.informit.com/store/product.aspx?isbn=0321533216

Author Biography

Eric Carter is a development manager on the Visual Studio team at Microsoft. He helped invent, design, and implement many of the features that are in VSTO today. Previously at Microsoft he worked on Visual Studio for Applications, the Visual Studio Macros IDE, and Visual Basic for Applications for Office 2000 and Office 2003.

 

Eric Lippert’s primary focus during his twelve years at Microsoft has been on improving the lives of developers by designing and implementing useful programming languages and development tools. He has worked on the Windows Scripting family of technologies, Visual Studio Tools for Office, and, most recently, on the C# compiler team.

Table of Contents

Figuresp. xxxi
Tablesp. xlv
Forewordp. li
Prefacep. lv
Acknowledgmentsp. lix
About the Authorsp. lxi
An Introduction to VSTOp. 1
An Introduction to Office Programmingp. 3
Why Office Programming?p. 3
Office Business Applicationsp. 3
Office Object Modelsp. 7
Properties, Methods, and Eventsp. 14
The Office Primary Interop Assemblies (PIAs)p. 39
Conclusionp. 48
Introduction to Office Solutionsp. 51
The Three Basic Patterns of Office Solutionsp. 51
Office Automation Executablesp. 54
Office Add-Insp. 69
Code Behind a Documentp. 78
Conclusionp. 86
Office Programming in .NETp. 87
Programming Excelp. 89
Ways to Customize Excelp. 89
Programming User-Defined Functionsp. 98
Introduction to the Excel Object Modelp. 108
Conclusionp. 112
Working with Excel Eventsp. 115
Events in the Excel Object Modelp. 115
Conclusionp. 162
Working with Excel Objectsp. 163
Working with the Application Objectp. 163
Working with the Workbooks Collectionp. 178
Working with the Workbook Objectp. 181
Working with the Worksheets, Charts, Working with Document Propertiesp. 192
Working with the Windows Collectionsp. 195
Working with the Window Objectp. 199
Working with the Names Collection and Name Objectp. 202
Working with the Worksheet Objectp. 204
Working with the Range Objectp. 219
Special Excel Issuesp. 235
Conclusionp. 241
Programming Wordp. 243
Ways to Customize Wordp. 243
Programming Research Servicesp. 249
Introduction to the Word Object Modelp. 261
Conclusionp. 262
Working with Word Eventsp. 267
Events in the Word Object Modelp. 267
Events in Visual Studio Tools for Officep. 307
Conclusionp. 310
Working with Word Objectsp. 311
Working with the Application Objectp. 311
Working with the Dialog Objectp. 332
Working with Windowsp. 338
Working with Templatesp. 341
Working with Documentsp. 343
Working with a Documentp. 348
Working with the Range Objectp. 369
Working with Bookmarksp. 392
Working with Tablesp. 394
Working with Content Controlsp. 396
Conclusionp. 403
p. 9
Programming Outlookp. 405
Ways to Customize Outlookp. 405
Introduction to the Outlook Object Modelp. 419
Conclusionp. 422
Working with Outlook Eventsp. 425
Events in the Outlook Object Modelp. 425
Application-Level Eventsp. 427
Outlook Item Eventsp. 448
Other Eventsp. 470
Conclusionp. 473
Working with Outlook Objectsp. 475
Working with the Application Objectp. 475
Working with the Explorers and Inspectors Collectionsp. 486
Working with the Explorer Objectp. 488
Working with the Inspector Objectp. 501
Working with the NameSpace Objectp. 506
Working with the Folder Objectp. 519
Working with the Items Collectionp. 534
Properties and Methods Common to Outlook Itemsp. 548
Conclusionp. 569
p. 571
The VSTO Programming Modelp. 573
The VSTO Programming Model for Documentsp. 573
VSTO Extensions to Word and Excel Document Objectsp. 576
Dynamic Controls in the Documentp. 584
Advanced Topic: Class Hookup and Cookiesp. 591
Advanced Topic: Inspecting the Generated Codep. 594
VSTO Extensions to the Word and Excel Object Modelsp. 599
The VSTO Programming Model for Add-Insp. 619
Using VSTO Document Features in Application-Level Add-Insp. 621
Advanced Topic: Creating Worksheets Dynamicallyp. 624
Conclusionp. 625
Using Windows Forms and WPF in VSTOp. 627
Introductionp. 627
Adding Windows Forms Controls to Your Documentp. 634
Writing Code Behind a Controlp. 641
The Windows Forms Control Hosting Architecturep. 643
Properties Merged from OLEObject or OLEControlp. 654
Adding Controls at Runtimep. 658
Using WPF Controls in the Documentp. 669
Conclusionp. 671
Working with Document-Level Actions Panesp. 673
Introduction to the Document Actions Task Panep. 673
Working with the ActionsPane Controlp. 680
Using WPF Controls in an Actions Panep. 697
Conclusionp. 699
Working with Application-Level Custom Task Panesp. 701
Introduction to the Application-Level Custom Task Panesp. 701
Working with Custom Task Panesp. 704
Custom Task Panes and Application Windowsp. 710
Using WPF Controls in a Custom Task Panep. 719
Conclusionp. 722
Working with Outlook Form Regionsp. 723
Introduction to Form Regionsp. 723
Form Region Types and Custom Message Classesp. 743
Creating an Outlook Forms-Based Form Regionp. 749
Outlook Form Region Programmabilityp. 765
Conclusionp. 774
Working with the Ribbon in VSTOp. 777
Introduction to the Office Ribbonp. 777
Working with the Ribbon in the Ribbon Designerp. 800
Creating a Ribbon in an Excel Workbook Projectp. 812
Creating a Ribbon in an Outlook Add-In Projectp. 825
Advanced Ribbon Topicsp. 836
Conclusionp. 850
Working with Smart Tags in VSTOp. 851
Introduction to Smart Tagsp. 851
Creating Document-Level Smart Tags with VSTOp. 855
Creating Application-Level Smart Tagsp. 874
Conclusionp. 880
VSTO Data Programmingp. 881
Creating a Data-Bound Customized Spreadsheet with VSTOp. 882
Creating a Data-Bound Customized Word Document with VSTOp. 889
Datasets, Adapters, and Sourcesp. 891
Another Technique for Creating Data-Bound Documentsp. 901
Caching Data in the Data Islandp. 908
Advanced Topic: Using ICachedTypep. 911
Advanced ADO.NET Data Binding: Looking Behind the Scenesp. 913
Binding-Related Extensions to Host Items and Host Controlsp. 914
Using Data Binding and Dynamic Controls from an Application-Level Add-Inp. 921
Conclusionp. 928
Server Data Scenariosp. 929
Populating a Document with Data on the Serverp. 929
Using ServerDocument and ASP.NETp. 931
A Handy Client-Side ServerDocument Utilityp. 939
The ServerDocument Object Modelp. 941
Conclusionp. 952
ClickOnce Deploymentp. 955
Introductionp. 955
Prerequisitesp. 956
Deploying Add-Insp. 958
Deploying Document Solutionsp. 982
ClickOnce Securityp. 995
Other Deployment Scenariosp. 1009
Advanced Topic: Editing Manifests Using Magep. 1010
Conclusionp. 1015
Bibliographyp. 1017
Index 1019
Table of Contents provided by Publisher. All Rights Reserved.

Excerpts

Preface PrefaceIn 2002 the first release of Visual Studio .NET and the .NET Framework was nearing completion. A few of us at Microsoft realized that Office programming was going to miss the .NET wave unless we did something about it.What had come before was Visual Basic for Applications (VBA), a simple development environment integrated into all the Office applications. Each Office application had a rich object model that was accessed via a technology known as COM. Millions of developers identified themselves as "Office developers" and used VBA and the Office COM object models to do everything from automating repetitive tasks to creating complete business solutions that leveraged the rich features and user interface of Office. These developers realized that their users were spending their days in Office. By building solutions that ran inside Office, they not only made their users happy, but also were able to create solutions that did more and cost less by reusing functionality already available in the Office applications.Unfortunately, because of some limitations of VBA, Office programming was starting to get a bad rap. Solutions developed in VBA by small workgroups or individuals would gain momentum, and a professional developer would have to take them over and start supporting them. To a professional developer, the VBA environment felt simple and limited, and of course, it enforced a single language: Visual Basic. VBA embedded code in every customized document, which made it hard to fix bugs and update solutions because a bug would get replicated in documents across the enterprise. Security weaknesses in the VBA model led to a rash of worms and macro viruses that made enterprises turn VBA off.Visual Studio .NET and the .NET Framework provided a way to address all these problems. A huge opportunity existed not only to combine the richness of the new .NET Framework and developer tools with the powerful platform that Office has always provided for developers, but also to solve the problems that were plaguing VBA. The result of this realization was Visual Studio Tools for Office (VSTO).The first version of VSTO was simple, but it accomplished the key goal of letting professional developers use the full power of Visual Studio .NET and the .NET Framework to put code behind Excel 2003 and Word 2003 documents and templates. It let professional developers develop Office solutions in Visual Basic and C#. It solved the problem of embedded code by linking a document to a .NET assembly instead of embedding it in the document. It also introduced a new security model that used .NET code-access security to prevent worms and macro viruses.The second version of VSTO, known as VSTO 2005, was even more ambitious. It brought with it functionality never available to the Office developer before, such as data binding and data/view separation, design-time views of Excel and Word documents inside Visual Studio, rich support for Windows Forms controls in the document, the ability to create custom Office task panes, server-side programming support against Officeand that's just scratching the surface. Although the primary target of VSTO is the professional developer, that does not mean that building an Office solution with VSTO is rocket science. VSTO makes it possible to create very rich applications with just a few lines of code.The third version of VSTO, which this b

An electronic version of this book is available through VitalSource.

This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.

By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.

Digital License

You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.

More details can be found here.

A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.

Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.

Please view the compatibility matrix prior to purchase.