|
Introduction - Who Should Use This BookThis book is designed primarily for Microsoft Outlook application developers using Microsoft Exchange Server. Many of the examples assume that you’ll be deploying workgroup applications in an Exchange Server environment using both public and private folders. It’s also assumed that you’ll be using Outlook 2002 to run the applications in this book. Although many of the techniques discussed in this book can be used in prior versions of Outlook, you won’t be able to take full advantage of the code examples and sample applications unless you’ve installed Outlook 2002. Part I, "Introducing Microsoft Outlook 2002," provides you with a broad perspective on what you can accomplish using Outlook as a development platform. You’ll learn about some tools and add-ins included on the companion CD that will make your life easier as an Outlook developer. In Part II, "Quick Guide to Building Applications," both programmers and nonprogrammers can pick up this book and find the information they need to develop groupware applications. Part III, "Building Blocks of Applications," gives you a solid foundation on which to build more complex Outlook applications. You’ll understand that Outlook applications are developed using the core objects of messages and folders, and you’ll learn how to customize Outlook forms to create an Outlook application. In Part IV, "Beyond the Basics," you’ll learn how to use events in the Outlook object model to write event-aware code. After an introduction to the Outlook development environment, you will be able to write Microsoft Visual Basic or Microsoft Visual Basic Scripting Edition (VBScript) code to create more sophisticated applications than you can using Outlook’s built-in modules. You’ll learn about the critical Outlook E-Mail Security Update that is built into Outlook 2002 and how you can work with this component of Outlook to protect your personal and private data from e-mail worms and viruses. I’ll also extend what you’ve learned in a complete customer relationship management (CRM) sample application that operates both on line and off line. Part V, "Advanced Topics," is for developers who are at an intermediate or advanced level in Visual Basic. Step-by-step instructions are included that show you how to create COM Add-ins that replace Exchange Client Extensions and provide Outlook functionality that you only dreamed of in the past. You’ll learn about the new Outlook 2002 View Control, folder home pages, and integrating Outlook with Digital Dashboards and Web Parts. Finally, you’ll see how to add document management and powerful search capabilities to your Outlook applications with SharePoint Portal Server 2001. More Detail on How This Book Is OrganizedThis book consists of the following five parts and sample applications. Part I Introducing Microsoft Outlook 2002Chapter 1, "Applications You Can Create with Outlook," discusses the processes and problems best suited for Outlook solutions and shows you the kind of Request, Discussion, Tracking, and Reference applications you can build to streamline communications in your organization. Chapter 2, "Outlook Design Tools," showcases the tools available for creating Outlook forms and for building COM Add-Ins and folder home pages by using Microsoft Office XP Developer, Visual Basic, and Microsoft Visual InterDev. Chapter 2 also introduces you to evaluation versions of important third-party tools and Microsoft SDKs that are included on the companion CD. Part II Quick Guide to Building ApplicationsChapter 3, "Customize Built-In Modules," shows you how to create instant groupware applications by modifying the built-in Contacts application, customizing it for tracking customer correspondence related to a beta program, and then copying it to Public Folders on Exchange Server. Chapter 4, "Design a Custom Application," shows you how to build a Discussion application called Product Ideas that makes it possible for users to submit, read, and respond to new products ideas. Part III Building Blocks of ApplicationsChapter 5, "Forms," introduces the form design process, and covers fundamental form design tasks such as adding controls and fields, creating new actions, setting form properties, and publishing forms. Chapter 6, "Controls, Fields, and Properties," covers the fundamental skills and information you need to effectively use controls, fields, and properties on a form. It also explains the unique features of each commonly used control, and then offers some strategies for implementing these controls and fields in an application. Chapter 7, "Actions," discusses the easiest way to create responses for Message forms, explains how to create custom Reply actions for Message forms, and then shows how to create custom Reply To Folder actions for Post forms. Chapter 8, "Folders," takes an in-depth look at the folder design process, discusses how to make a folder available for offline use, and explains how to create custom views and folder home pages. It also covers setting folder permissions and building rules. Part IV Beyond the BasicsChapter 9, "Raise Events and Move to the Head of the Class," explains how you can use all the new events in the Outlook Object Model to write event-aware code in Outlook Visual Basic for Applications or an Outlook COM Add-In. Chapter 10, "The Outlook Development Environment," introduces the Outlook Script Editor for VBScript code behind Outlook forms. This chapter also discusses debugging with the Microsoft Script Editor and shows you the object models used in Outlook development. Chapter 11, "Using Visual Basic, VBA, or VBScript with Outlook," introduces VBScript and provides a wide variety of code examples for the most commonly performed tasks using VBScript or Visual Basic in Outlook. Chapter 12, "The Northwind Contact Management Application, " demonstrates how you can apply what you’ve learned so far in a reusable Customer Relationship Manangment (CRM) application designed for online and offline use. Chapter 13, "Distributing and Securing Applications," shows you how to distribute forms in folders and provides some techniques for maintaining and securing applications. This chapter also discusses the critical areas of Outlook Object Model and attachment security and illustrates how the Outlook E-Mail Security Update has been integrated into Outlook 2002. Finally, you’ll learn how your current and future applications can coexist with the Outlook E-Mail Security Update. Part V Advanced TopicsThe Advanced Topics chapters are primarily for developers who want to use Visual Basic to extend Outlook in a corporate environment where Exchange Server is installed. Chapter 14, "Creating COM Add-Ins with Visual Basic," provides you with practical templates for Visual Basic COM Add-in component creation and discusses the security issues associated with COM Add-ins. You’ll also learn how to use Visual Basic to create an ActiveX control that serves as a property page in the Outlook Tools Options dialog box. Chapter 15, "Integrating Outlook with Web Applications," shows you how to use the Outlook View Control in Web pages. You’ll also learn how to create Digital Dashboard Web Parts for the Northwind Contact Management Application. In Chapter 16, "Using Outlook with SharePoint Portal Server," you’ll discover how you can use the PKMCDO Object Model for document check in, check out, and versioning. You will be able to integrate the Northwind Contact Management application with SharePoint Portal Server document management and search. Sample ApplicationsThe sample application for this book is in the Building Microsoft Outlook 2002 Applications personal folders (.pst) file on the CD that accompanies this book. You can modify the sample Northwind Contact Management application for use in your organization. The Northwind Contact Management application is a CRM application created in Exchange public folders, and is suitable for both online and offline use. This application is extended in the Advanced Topics chapters of the book. You can integrate the Northwind Contact Management application with the Digital Dashboard Resource Kit 3.0 and with SharePoint Portal Server 2001 as shown in Figure I-1. Figure I.1 - The Northwind Portal Site integrates Outlook with custom Web Parts and SharePoint Portal Server Document Management. System RequirementsTo run the code on the companion CD, you will need a computer that meets the following minimum requirements:
The following software must be installed on your system:
To modify the sample applications, you will need the following software:
To install the sample applications on Exchange Server:
To extend the sample applications:
Using the Companion CDThe companion CD contains all the code necessary to run the sample applications discussed in this book, including evaluation versions of several third-party tools, sample COM Add-Ins, Web Parts for use in Digital Dashboards or SharePoint Portal Server 2001, the Exchange SDK, and the SharePoint Portal Server SDK. It also includes a sample personal folders (.pst) file, which contains all of the applications and sample code covered in this book. You might want to make a copy of the applications and dissect the ones you’re most interested in to see how they’re developed. You can also customize these applications and put them to work in your organization. Run the Setup Program for Building Applications with Microsoft Outlook Version 2002The Setup program requires that you have already installed Microsoft Outlook 2002 on your computer. Microsoft Outlook 2002 is not included on the companion CD. You must install Microsoft Outlook 2002 before you proceed.
To install the book's program files
Using the Building Microsoft Outlook 2002 Applications Personal Folder (.pst) FileThe Setup program installs a Building Microsoft Outlook 2002 Applications file in the destination folder you specified during installation and adds this file as a personal folders file to your current profile. The Building Microsoft Outlook 2002 Applications file is actually a personal folders (.pst) file that contains sample forms and files, links to technical articles and white papers, links to Microsoft Product Support Services Knowledge Base articles that pertain to Outlook development, and all the files necessary to run the sample applications and code examples. Although it’s not required that you add the Building Microsoft Outlook 2002 Applications file to your system, it serves as a valuable reference tool, and the sample applications can be used as a starting point for building applications that can be customized for your environment. Installing VBAProject.otmOutlook 2002 supports Visual Basic for Applications as an integral component of the Outlook application environment. All the code for Outlook Visual Basic for Applications is stored in a single file, VBAProject.otm. This file is stored in the locations in the following table depending upon operating system and whether user profiles are operational on your system. If your operating system is installed on a drive other than drive c:\, adjust the location accordingly.
If you already have a VBAProject.otm on your system, the installation program will display an alert message informing you that it has detected an existing VBAProject.otm. In this instance, the VBAProject.otm that accompanies this book will be renamed to VBABAO2K2.otm and copied to the location of your existing VBAProject.otm. For you to use the sample code in the VBAProject.otm that accompanies this book, you will have to rename your existing VBAProject.otm to a name such as MyVBAProject.otm and then rename VBBAO2K2.otm to VBAProject.otm. If you don’t have an existing VBAProject.otm, the VBAProject.otm that accompanies this book will be installed automatically and you can ignore the following steps. To install the VBAProject.otm accompanying this book if you already have VBAProject.otm installed on your Windows 2000 system
The steps for other operating systems are similar. Simply locate the vba*.otm file on your system, rename it, and replace with the supplied file. Outlook Macro SecurityIf Outlook Macro Security is set to High, the macros in VBAProject.otm will be disabled. In Outlook 2002, the default Outlook Macro Security setting is High. For the code in the VBAProject.otm file accompanying this book to run correctly, you must change the Outlook Macro Security setting to Low or Medium. Changing the setting to Low or Medium impacts only your ability to run the code in VBAProject.otm; it does not modify the built-in object model and attachment security mechanisms built into Outlook 2002. To change Outlook Security settings to Low or Medium
Because Outlook Visual Basic for Applications code is loaded on demand, you must press Alt+F11 to open the Visual Basic Editor the first time you launch Outlook after you install the VBAProject.otm that accompanies this book. Once you press Alt+F11, you’ll see the Macro Warning dialog box. Select the Enable Macros button to run the code in VBAProject.otm.
Installing Collaboration Data ObjectsSome of the code examples on the companion CD require the installation of Collaboration Data Objects (CDO) 1.21. CDO is not installed with the default Office XP setup. It is recommended that you install CDO before you run the code examples that are provided with this book. To install Collaboration Data Objects
Technical Support for the Companion CDEvery effort has been made to ensure the accuracy of this book and the contents of the companion CD. Microsoft Press provides corrections for books through the World Wide Web at the following address: http://mspress.microsoft.com/support/search.shtml If you have comments, questions, or ideas regarding this book or the companion CD, please mail or e-mail them to Microsoft Press at the following addresses: Postal Mail Microsoft Press Please note that product support is not offered through the above mail addresses. For support information on Outlook, see the documentation for the appropriate product support phone number. |