Read more
Figures xxxi Tables xlv Foreword xlix Preface liii Acknowledgments lvii About the Authors lix Part I: An Introduction to VSTO 1Chapter 1: An Introduction to Office Programming 3 Why Office Programming? 3 Office Object Models 6 Properties, Methods, and Events 12 The Office Primary Interop Assemblies (PIAs) 34 Conclusion 43 Chapter 2: Introduction to Office Solutions 45 The Three Basic Patterns of Office Solutions 45 Office Automation Executables 49 Office Add-Ins 60 Code Behind a Document 65 Conclusion 72 Part II: Office Programming in .NET 73Chapter 3: Programming Excel 75 Ways to Customize Excel 75 Programming User-Defined Functions 83 Introduction to the Excel Object Model 92 Conclusion 98 Chapter 4: Working with Excel Events 99 Events in the Excel Object Model 99 Events in Visual Studio 2005 Tools for Office 138 Conclusion 142 Chapter 5: Working with Excel Objects 143 Working with the Application Object 143 Working with the Workbooks Collection 157 Working with the Workbook Object 161 Working with the Worksheets, Charts, and Sheets Collections 169 Working with Document Properties 172 Working with the Windows Collections 175 Working with the Window Object 179 Working with the Names Collection and Name Object 181 Working with the Worksheet Object 183 Working with the Range Object 197 Special Excel Issues 213 Conclusion 220 Chapter 6: Programming Word 223 Ways to Customize Word 223 Programming Research Services 229 Introduction to the Word Object Model 237 Conclusion 238 Chapter 7: Working with Word Events 243 Events in the Word Object Model 243 Why Are There Multiple Application and Document Event Interfaces? 244 Events in Visual Studio Tools for Office 273 Conclusion 275 Chapter 8: Working with Word Objects 277 Working with the Application Object 277 Working with the Dialog Object 299 Working with Windows 304 Working with Templates 307 Working with Documents 310 Working with a Document 315 Working with the Range Object 335 Working with Bookmarks 358 Working with Tables 360 Conclusion 362 Chapter 9: Programming Outlook 363 Ways to Customize Outlook 363 Custom Property Pages 370 Introduction to the Outlook Object Model 378 Introduction to the Collaboration Data Objects 382 Conclusion 386 Chapter 10: Working with Outlook Events 387 Events in the Outlook Object Model 387 Application-Level Events 392 Outlook Item Events 405 Other Events 419 Conclusion 422 Chapter 11: Working with Outlook Objects 423 Working with the Application Object 423 Working with the Explorers and Inspectors Collections 431 Working with the Explorer Object 433 Working with the Inspector Object 440 Working with the NameSpace Object 443 Working with the MAPIFolder Object 450 Working with the Items Collection 459 Properties and Methods Common to Outlook Items 466 Outlook Issues 486 Conclusion 492 Chapter 12: Introduction to InfoPath 493 What Is InfoPath? 493 Getting Started 494 Form Security 499 Programming InfoPath 505 Data Source Events 509 Form Events, Properties, and Methods 518 Conclusion 529 Part III: Office Programming in VSTO 531Chapter 13: The VSTO Programming Model 533 The VSTO Programming Model 533 VSTO Extensions to Word and Excel Objects 536 Dynamic Controls 542 Inspecting the Generated Code 549 VSTO Extensions to the Word and Excel Object Models 555 Conclusion 569 Chapter 14: Using Windows Forms in VSTO 571 Introduction 571 Adding Windows Forms Controls to Your Document 577 Writing Code Behind a Control 584 The Windows Forms Contro...