Info

Northwind Traders

Figure 2.5 - The Script Editor window shows the item_Open function.

For more information about using VBScript, see Chapter 11, "Using Visual Basic, VBA, or VBScript with Outlook."

Folder View Design Tools

With Outlook, you can create custom views by adding, removing, and rearranging fields in the Column Heading row of the folder. For example, you can create a column by dragging a field from the Field Chooser to the Column Heading row.

To add or remove a column using the Field Chooser

1. Select a folder on the Folder List. Click Toolbars on the View menu, and then click Advanced.

2. Select Field Chooser from the Advanced toolbar.

3. Drag the field you want to add as the new column to the Column Heading row, as shown in Figure 2-6. Use the double-arrow marker to position the new column heading in the Column Heading row.

4. To remove the column heading, drag the column heading you added away from the Column Heading row until an X appears, and then release the mouse button. As shown in Figure 2-6, the Business Phone 2 column is created by dragging the Business Phone 2 field from the Field Chooser to the Column Heading row.

Figure 2.6 - The Beta Contacts folder and the Field Chooser.

Drag and drop grouping You can group items in a folder by a particular field simply by dragging the field you want to group by above the Column Heading row. On the Advanced toolbar, click the Group By icon. Click and drag a field from the Field Chooser to the area above the Column Heading row. You cannot group or sort by combination or formula fields.

Format columns The ability to format columns gives you great flexibility in designing views. For example, in many cases, you want the column label to be different than the name of the field the column is based on. To format a column, right-click the column heading and then click Format Columns on the shortcut menu. You can then choose the options you want.

In-cell editing When the in-cell editing option is turned on for a folder, users can edit and enter information in cells within the folder without opening a form. For example, in the Beta Contacts folder, as shown earlier in Figure 2-6, users can click in a Wants To Participate cell on the far right to add or remove a check box icon in the cell. To activate in-cell editing, select Current View on the View menu and then click Customize Current View. Click Other Settings, and then choose the Allow In-Cell Editing check box in the Rows box.

Best fit feature This feature automatically arranges the column size to fit the text in the column heading label. To choose the Best Fit option for a column, right-click the column heading and then click Best Fit on the shortcut menu.

Show only custom views Quite often, users are confused by the large number of views available in a folder. To alleviate this problem, Outlook makes it possible to show only the custom views created for the folder. To select this option, select Current View on the View menu and then click Define Views. Then select the Only Show Views Created For This Folder check box.

Folder Properties Dialog Box

With the folder Properties dialog box, as shown in Figure 2-7, you define folder attributes and behavior. For example, you can define who can access the folder and the functions they can perform, and you can create rules that automatically process items as they arrive in a folder.

To view all available Properties dialog box pages for a folder, the folder must be located in your Mailbox or in a public folder where you have owner permissions. Also note that the Outlook Address Book page is available only for contact-type folders.

For more information about designing folders or designing folder views, see Chapter 8, "Folders," and Chapter 15, "Integrating Outlook with Web Applications."

Figure 2.7 - The folder Properties dialog box. To view the folder Properties dialog box

• Right-click the folder, and then click Properties on the shortcut menu.

Outlook Visual Basic for Applications Design Tools

First introduced in Outlook 2000, Visual Basic for Applications (VBA) provides a convenient environment for writing and debugging code. The version of VBAthat ships in Office XP is 6.3. Once you have programmed and tested a prototype of your application in VBA, you can take the next step by moving your code to a COM Add-in. Unfortunately, only one VBA project can run in any given Outlook session. This limitation means that VBA code is typically used for prototyping solutions rather than deploying solutions in a corporate environment.

VBA brings many features to the design environment of Outlook, including the ability to display User Forms, create custom command bars for the Outlook Inspector and Explorer windows, and write code h standard and class modules. You need to understand that Outlook VBA does not replace the design tools used in Outlook forms development. You cannot use VBA to program Outlook forms directly However, VBA provides you with the ability to design new features in the Outlook application environment and to customize the Outlook experience for yourself and your users. Corporate users will prototype COM Add-ins—ActiveX components that replace obsolescent Exchange Client Extensions—using Outlook VBA code and design tools.

Visual Basic Editor

The Visual Basic Editor gives you an integrated design environment for writing and debugging your code. You can now enjoy the same feature-rich editor that users of other Office applications such as Word and Excel have used for quite some time. We'll tour some of the important VBA features in this chapter. In later chapters, you will learn how to use the new objects, properties, and events in the Outlook 2002 object model.

To open the Visual Basic for Applications Editor window

1. On the Explorer or the Inspector Tools menu, click Macro.

2. Click the Visual Basic Editor command. You can also press Alt+F11 to open the VBA Editor window, shown in Figure 2-8.

Was this article helpful?

0 0

Post a comment