Info

(so;

Figure 1.1 - The Northwind Portal Site integrates Outlook with custom Web Parts and SharePoint Portal Server Document Management.

System Requirements

To run the code on the companion CD, you will need a computer that meets the following minimum requirements: ® Pentium 133 or higher Pentium-compatible CPU

® 32 megabytes (MB) of RAM or more, depending on the operating system, plus 8 MB of RAM per each open Office application ® 650 MB hard disk or larger, depending on the operating system

® Mouse or other pointing device (recommended)

The following software must be installed on your system:

• Windows NT 4.0, Windows 2000 Professional, or Windows 2000 Server or later

® Microsoft Internet Explorer 5.01 or later (to view the electronic version of this book)

• Microsoft Outlook 2002

• Collaboration Data Objects 1.21

To modify the sample applications, you will need the following software: ® Microsoft Visual Basic 6 with Service Pack 3 or later

® Microsoft Visual InterDev 6.0 with Service Pack 3 or later

® Microsoft Office XP Developer

To install the sample applications on Exchange Server:

® Microsoft Exchange 5.5 Server or Microsoft Exchange 2000 Server

To extend the sample applications:

® Microsoft Digital Dashboard Resource Kit 3.0 or later • Microsoft SharePoint Portal Server 2001

Using the Companion CD

The 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-lns, 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 2002

The 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

1. Insert the CD accompanying this book into your CD-ROM drive.

2. If a menu screen does not launch automatically, double-click StartCD.exe in the root folder of the CD-ROM.

3. Click Install Samples to start the Building Applications with Microsoft Outlook 2002 installation to your hard disk. A Welcome dialog box will appear.

4. In the Welcome dialog box, click Next.

5. In the Select Directory dialog box, select the folder where you will install the Building Microsoft Outlook Version 2002 Applications personal folders (.pst) file. Click the Browse button if you want to select an alternative folder.

6. Click Next to begin the installation process.

7. If Setup detects that you already have a VBAProject.otm file on your system, you will see an Alert message box that informs you that the VBAProject.otm accompanying this book has been renamed and the location of the renamed file. See "Installing VBAProject.otm" later in this Introduction if you see this alert message box during installation. Click OK to dismiss the VBAProject.otm Warning alert box if it appears during installation.

8. Click Finish to complete the installation.

Using the Building Microsoft Outlook 2002 Applications Personal Folder (.pst) File

The 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.otm

Outlook 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.

Operating System

Location for VBAProject.otm

Microsoft Wndows 98 and Wndows Me

<dnVe>:\Wndows\Application Data\Microsoft\ Outlook

Microsoft Wndows NT 4.0

<dnVe>:\Wnnt\Profiles\ <user>\Application Data\Microsoft\Outlook

Wndows 2000

<dnVe>:\Documents and Settings\Profiles\<user>\Application Data\Microsoft\Outlook

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 VBABA02K2.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 VBBA02K2.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

1. If Outlook is running, quit Outlook by using the Exit command on the File menu. You must exit Outlook completely or you will receive a sharing violation when you attempt to rename VBAProject.otm.

2. Click the Start button on the Windows Task bar, click Search, and click For Files Or Folders.

3. Type vba*.otm in the Search For Files Or Folders Named drop-down combo box.

4. Select Local Drives in the Look-in drop-down combo box.

5. Make sure that the Include Subfolders box is checked.

6. Click Find Now.

7. When VBAProject.otm and VBABA02K2.otm are found on your system, right-click VBAProject.otm and select Rename on the shortcut menu. Type MyVBAProject.otm as the new name, and press Enter.

8. Right-click VBABA02K2.otm, and select Rename on the shortcut menu. Type VBAProject.otm as the new name. Press Enter.

9. Restart Outlook. The VBAProject.otm that accompanies this book is now the operational VBA Project for Outlook. 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 Security

If 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

1. Select Macro from the Tools menu.

2. Select Security from the Macro submenu.

3. Select the Low or Medium security option on the Security Level page.

4. Click OK to accept your selection.

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 Objects

Some 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

To install Collaboration Data Objects

1. Insert the Office XP CD into your CD-ROM drive.

2. Click Start, click Settings, and then click Control Panel.

3. Double-click Add/Remove Programs.

4. On the Install/Uninstall page, click Microsoft Office XP—the exact title will vary depending on the version of Office XP installed on your computer—and then click Add/Remove on Windows 2000 computers. On Windows 98, Windows Me, and Windows NT 4.0 computers, click Change.

5. In the Microsoft Office XP Maintenance Mode dialog box, click Add Or Remove Features.

6. Double-click the Microsoft Outlook For Windows item to expand the item in the Microsoft Office XP: Update Features dialog box.

7. Click the Collaboration Data Objects item under Microsoft Outlook For Windows.

8. Select Run From My Computer in the installation options drop-down.

9. Click Update to complete the installation of Collaboration Data Objects.

Technical Support for the Companion CD

Every 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:

h ttp://mspress. microsoft, com/support/search. h tm

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

Attn: Building Applications with Microsoft Outlook Version 2002 Editor One Microsoft Way Redmond, WA 98052-6399

E-Mail

[email protected]

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.

Chapter 1 - Applications You Can Create with Outlook

Microsoft Outlook 2002 offers incremental improvements to Outlook 2000 for collaborative application developers. You can programmatically create and modify Views, create a Search object and iterate over its Results collection, and manipulate Reminders in ways that were impossible in previous versions of Outlook. On the other hand, Outlook 2002 creates security roadblocks that were not present in the initial version of Outlook 2000. These security features will perplex many developers who believe that the Outlook development world has been held captive by the destructive behavior of hackers who use Outlook's object model as a launching pad. Regardless of whether Outlook developers applaud, Microsoft had to respond to the threat of massive disruption of corporate e-mail systems by Outlook-related viruses. Developed in response to e-mail-borne viruses such as Melissa and ILoveYou, the Outlook E-Mail Security Update is built into Outlook 2002 and cannot be removed. On the positive side, Outlook 2002 provides a mechanism to create COM Add-ins that can be trusted by an Exchange administrator and that bypass the security restrictions built into the Outlook object model.

Outlook 2002 supports Microsoft Visual Basic for Applications 6.3. No longer do Outlook developers have to dream of a professional editor and debugger. The full Visual Basic object browser is only a keystroke or mouse click away. Performance improves with strongly typed variables and early binding. ActiveX property pages created in Visual Basic can replace Exchange custom extensions written in C++. Folder home pages and the Outlook View Control offer a means of scripting Active Server Pages to provide Web-based views into Exchange and Outlook public and private folders. COM Add-ins allow you to create commercial or corporate versions of Outlook. The list goes on. are just a few of the things you can accomplish with Outlook 2002.

• Share information You can build applications that allow users to share all types of information, including schedules, tasks, contacts, distribution lists, documents, product ideas, and customer feedback.

• Structure information You can build forms and folders to structure information so it's both easy to read and easy to find. For example, you can create a Preferred Vendors public folder so managers can quickly find qualified vendors that have been referred by other managers in the organization, or you can use the Product Ideas application supplied with this book to enable users to submit, organize, and view new product ideas in a public folder.

• Distribute information You can create forms that enable users to send announcements, sales reports, documents, and request-for-services items. For example, you can create a Bulk Mailer form so you can automatically notify all users in a particular distribution list when a product update is available.

• Collect information You can create forms and folders for collecting information. For example, you can create a User Response Form and public folder for collecting information about a product under development. Or you can use the Classified Ads application supplied with this book to allow users to submit and respond to classified ads.

• Collaborate on information One of the benefits of Outlook is that it allows each user to collaborate on the same item. For example, with the Product Ideas application, users from different locations can all participate in an online discussion about a particular product feature. With the Contact Management application, users can collaborate on the pursuit of new customers in a set of linked public folders.

• Streamline processes You can create applications that are modeled on paper-based processes in your organization. For example, you can create forms and folders that allow users to electronically submit vacation requests, travel plans, copier requests, purchase orders, time cards, status reports, classified ads, and training class registration. Using the Exchange Workflow Designer for Exchange 2000, you can integrate Outlook forms with folder-based workflow logic and create powerful workflow applications.

• Work off line One of the advantages of Outlook over a pure Web mail interface is the ability of mobile users to work off line and consolidate their work later. Remote users can update custom forms and then synchronize their changes when they return to the office.

Types of Applications You Can Create

The two main building blocks of Outlook applications are forms and folders. From an object model perspective, all Outlook applications consist of message and folder containers. Advanced applications elaborate this core model by either presenting data in departmental or corporate databases or by maintaining links to Web documents stored with Share Point Team Services in Microsoft Office XP.

The design tools described in this book allow you to create a wide variety of Outlook and Exchange applications, ranging from rudimentary applications that leverage the basic Outlook forms to more complex collaboration and tracking applications that are multitiered:

• Applications that consist entirely of forms These are forms that are not associated with a specific folder, such as the While You Were Out form.

• Applications that consist of a custom folder and standard forms When you create a folder, you often will create custom views for that folder while still using the standard Outlook forms. For example, you might create a Contacts folder in a public folder and create custom views for the folder, but not change the standard forms supplied with the folder.

• Applications created with the Team Folder Wizard The Team Folder Wizard lets you create the following types of applications with the ease of a wizard: discussion, frequently asked questions, document library, issue tracking, team calendar, team contacts, team project, and team tasks. Folder home pages for these applications can be customized to go beyond what the wizard provides.

• Applications that consist of a custom folder and custom forms In many cases, you customize both the folder and the form to build an application. For example, the Training Management, Classified Ads, and Contact Management applications all consist of customized forms and folders.

• Applications that use folder home pages Outlook 2002 allows developers to combine the power and flexibility of Web pages with Outlook views and offline support for mobile users. Folder home pages provide users with a graphical way to organize their Outlook information with Web links to related content on either the Internet or a corporate intranet. Active Server Pages and the Outlook View Control let you combine Outlook views with Active Server Page scripting. You can create HTML-based Web views of Exchange folders with links to user instructions, frequently asked questions, or component downloads. Folder home pages can also provide data or pivot table analysis to the user with the new Office XP Pivot Ta ble List control. Figure 1-1 shows a Digital Dashboard folder home page in the Companies folder of the North wind Contact Management Application.

fi, "orthwind Dashboard - Microsoft Outlook

File Edit View Favorites Tools Actions Help | iHlNew x | © - | Find | 10 Type a contact to find - | [?)

outlook:\\Pub!ic Fo¡ders\AII Public FoiderslNorthwind Contact Management Appiication\Connpanies

Northwind Dashboard

My Dashboard Northwind Dashboard

Companies

Was this article helpful?

0 0

Post a comment