About the Book
See how to build rich, client-side collaborative
applications with Outlook 2002.
Get an insider’s view on how to develop
interactive client-side collaboration and messaging applications with this
hands-on programming guide. It provides in-depth technical information,
strategies, and code to help you leverage the power of Outlookâ 2002
and SharePoint™ Portal Server. You get complete details on how to build
Outlook 2002 Web Parts using the Digital Dashboard Resource Kit and Microsoft®
Office XP Developer. Learn how to incorporate these Web Parts into a Digital
Dashboard application. You’ll find a comprehensive treatment of Outlook
2002 security, including the Administrative Form in public folders and
trusted COM Add-ins that operate with full access to the Outlook Object
Model. The companion CD contains source code and files to simplify creating
and using the applications analyzed in the book. Expert instruction includes
these topics:
• Applications you can create with Outlook
2002
• Overview of Outlook design tools
• Customizing built-in modules
• Designing a custom application
• Forms
• Controls, fields, and properties
• Actions
• Folders
• Events
• The Outlook development environment
• Using Microsoft Visual Basic®, Visual
Basic for Applications (VBA), or Visual Basic, Scripting Edition (VBScript),
with Outlook
• Sample contact-management application
• Distributing and securing applications
• Creating COM Add-ins with Visual Basic
• Integrating Outlook with Web applications
• Using Outlook with SharePoint Portal
Server
Related Books
Table of Contents
Foreword
xli
Acknowledgments
xliii
Introduction
xlv
PART I INTRODUCING MICROSOFT
OUTLOOK 2002
1 Applications You Can
Create with Outlook 3
Types
of Applications You Can Create 5
Forms
You Can Create 7
Message Forms 8
Post Forms 9
Built-In Module Forms 10
Folder
Applications 11
Folders Based on Built-In Modules 11
Discussion Folders 13
Tracking Folders 14
Reference Applications 14
For More
Form and Folder Ideas 16
2 Outlook Design Tools
17
Help
and Web Sites 18
To open the Help And Web Sites folder 18
To open a Web page directly in Outlook 19
To add a page opened in a Web View to your Outlook Bar 19
Outlook
Form Design Mode 20
To view an Outlook form in Design mode 20
Properties Dialog Box 21
To view the Properties dialog box 21
Advanced Properties Dialog Box 21
To view the Advanced Properties dialog box 22
The Visual Basic Expression Service 23
To open the Business Card Request form in Design mode 23
To open the Visual Basic Expression Service 23
Script Editor and VBScript 24
To view the Script Editor 24
Folder View Design Tools 25
To add or remove a column using the Field Chooser 25
Folder Properties Dialog Box 27
To view the folder Properties dialog box 28
Outlook
Visual Basic for Applications Design Tools 28
Visual Basic Editor 29
To open the Visual Basic for Applications Editor window 29
To open the Visual Basic for Applications Object Browser 30
To add a UserForm to your Outlook VBA project 31
Add-Ins and Other Design Tools 32
Other
Tools and Add-Ins 35
Debugging Tools 35
Development Tools 36
Other Tools 37
PART II QUICK GUIDE TO
BUILDING APPLICATIONS
3 Customize Built-In Modules
41
Overview
of the Folder You Create 42
Create
New Folders 45
Create the Design Environment Personal Folder (.pst) File 46
To create the Design Environment personal folder 46
Create the Beta Contacts Folder 46
To create the Beta Contacts folder 46
Create
Custom Views 47
Create the Potential Beta Participants View 47
To create the Potential Beta Participants view 47
To remove fields 48
To add new fields 48
To drag the Company column heading 49
To drag the fields to the Column Heading row 50
To adjust the column widths 50
Create the Beta Participants View 50
To create the Beta Participants view 51
To remove fields from the view 51
To add new fields 52
To drag the fields to the Column Heading row 52
To adjust the column widths 53
To create a filter 53
Create
Items for the Beta Contacts Folder 54
To switch to the Potential Beta Participants view 54
To create a Beta Contacts item 54
To create a second Beta Contacts item 55
To create third and fourth Beta Contacts items 55
Enter
Dates in the Beta Participants View 57
To switch to the Beta Participants view 57
To enter the Beta Agreement Sent date in the fields 57
Customize
the Contacts Form 57
Open the Contacts Form 58
To open the Contacts form in Design mode 58
To switch from Design mode to Run mode 58
Rename the New Page 58
To rename and show the page 59
Add Controls to the Form 59
To show the Control Toolbox 59
To add the ComboBox control 59
To set properties for the ComboBox control 60
To add a label 61
To add a TextBox control 61
To set properties for the TextBox control 62
To add a label 63
To add a CheckBox control 63
To create the Current Customer field 63
Set Form Properties 64
To set form properties 64
Test
the Form at Design Time 65
To switch from Design mode to Run mode 65
Publish
the Form 65
To publish the form to the Beta Contacts folder Form Library 66
Specify the Default Form for the Folder 67
To make the Beta Contact form the default form 67
Test
the Application 67
To select the Potential Beta Participants view 67
To test the Beta Contact form 68
Delete
the Items You Created 68
To delete the items in the Beta Contacts folder 68
Copy
the Folder to Public Folders 68
To copy the Beta Contacts folder 69
Set Permissions
69
To set permissions for the Beta Contacts folder 69
Release
the Application 70
To set administration properties 70
4 Design a Custom Application
71
Overview
of the Product Ideas Application 72
Create
the Product Ideas Folder 75
To create the Product Ideas folder 75
Create
the Product Idea Form 75
Open the Post Form 76
To open the Post form in Design mode 76
Edit the Compose Page 76
To remove the Categories control 77
To adjust the Message control 77
To center the Message control horizontally 78
To add the Product Category control 78
To set the properties for the Product Category control 79
To add a Label control 80
To align the Subject and Product Category controls 81
To add a Label control 81
To move controls 82
To add a form graphic using a label control 82
To add a form graphic using a Frame control 83
To add a form graphic using an Image control 83
To save the form graphic for reuse on other pages 84
To set the Tab Order for the Compose page 84
Edit the Read Page 85
To switch to the Read page 85
To delete controls to make room for new controls 85
To adjust the From and Posted controls 86
To copy the controls from the Compose page 86
To set the tab order 87
Set Product Idea Form Properties 87
To set Product Idea form properties 87
Test the Form at Design Time 88
To switch between Design mode and Run mode when testing 88
Make a Backup Copy of the Product Idea Form 88
To save the Product Idea form 88
To open your backup copy of a form 89
Publish the Product Idea Form 89
To publish the form to the Product Ideas folder 89
Create
the Product Idea Response Form 90
Edit the Compose Page 91
To switch to the Compose page 91
To make the Product Category control read-only 91
To clear the Initial Value property 91
To change the label 92
Edit the Read Page 92
To switch to the Read page 92
To make the Product Category control read-only 92
To change the Product Idea label 92
Set the Form Properties 92
To set the form properties 92
Make a Backup Copy of the Product Idea Response Form 93
To make a backup copy of the Product Idea Response form 93
To open your backup copy of a form 93
Publish the Product Idea Response Form 93
To publish the Product Idea Response form 94
Set the
Actions 94
Set the Actions for the Product Idea Form 94
To open the Product Idea form in Design mode 94
To make the Reply To Folder action unavailable 95
To create a new action 96
Make a Backup Copy of the Product Idea Form 97
To make a backup copy of the Product Idea form 97
Republish the Product Idea Form 97
To republish the form 97
Set the Actions for the Product Idea Response Form 98
To open the Product Idea Response form in Design mode 98
To make the Reply To Folder action unavailable 99
To create a new action 99
Make a Backup Copy of the Product Idea Response Form 99
To make a backup copy of the Product Idea Response form 99
Publish the Product Idea Response Form 100
To publish the Product Idea Response form 100
Create
the Product Category View 100
To create the Product Category view 101
Remove Fields 101
To remove fields 101
Group Items 102
To group items by Product Category, then by Conversation 102
Sort Items 102
To sort items by the Conversation Index field 103
Arrange the Column Heading Order 103
To arrange the column heading order 103
Specify
the Default Form for the Folder 103
To specify that the Product Idea form is the default form 103
Set the
Hidden Property for the Product Idea Response Form 104
To set the Hidden property for the Product Idea Response form 104
Test
the Application 104
To test the Product Ideas application 104
Copy
the Folder to Public Folders 105
To copy the Product Ideas folder 105
About
Folder Permissions 106
Release
the Application 106
To set Administration properties 106
PART III BUILDING BLOCKS
OF APPLICATIONS
5 Forms
109
Become
Familiar with Designing Forms and Form Components 109
Outlook Form Design Mode 109
Types of Forms 111
Parts of a Form 112
Fields
115
Properties 116
Actions 116
Form Scripts 117
Learn
How Forms Work 119
What Is an Item? 119
What Happens When the Form Definition Is Saved with the Item? 120
How Is a Form Opened? 122
How Do Shared Fields Work? 122
Create
a Folder 123
To create a personal folder 124
Open
the Form and Switch to Design Mode 125
To create a Message form 125
To create a Post form 125
To create a Calendar, Contact, Distribution List, Task, or Journal form
126
To create a form based on a custom Outlook template 126
Edit
Form Pages 127
The Compose Page 127
The Read Page 128
About Separate Read Layout 128
To view either the Read or the Compose page 129
To specify the Separate Read Layout option for a page 130
Hide or Show a Page 131
To hide or show a page at run time 131
Rename a Page 131
To rename a page 132
Add Controls
132
To show the Control Toolbox 132
To add additional controls to the Control Toolbox 133
To add a control to a form 133
To set Display properties for a control 133
To set Advanced Properties for a control 133
Create
and Bind Fields 134
Create a New Field and Bind It to a Control 134
To create a new user-defined field 135
Bind a Control to an Existing Field 135
To bind a control to an existing field 135
Select Fields from Other Forms 135
To add a field set from a form to the field list 136
When to Use the Field Chooser 136
To add a field from the Field Chooser 137
Delete a Field 138
To delete a field 138
Polish
the Layout 138
Select and Edit Controls 138
Align Controls 138
To align controls 138
Space Controls 139
To space controls 139
Set Tab Order 139
To set the tab order for the Compose page 139
View the Form in Run Mode 140
To switch between Design mode and Run mode 140
Create
Help (Optional) 141
To create ControlTipText 141
Edit
the Read Page 141
To copy controls to the Read page 141
Set Properties for Controls on the Read Page 142
To make a control read only 142
Set the Tab Order for the Read Page 142
About Viewing the Read Page in Run Mode 142
To switch between Design mode and Run mode 142
Set Action
Properties 143
To create actions 143
To set actions 143
Set Form
Properties 143
To set form properties 143
Publish
the Form 146
Make a Backup Copy of the Form 147
To make a backup copy of a form 147
To open your backup copy of a form 147
Publish the Form 147
To specify the form name 148
To change the message class 148
To publish a form 149
Test
and Release the Form 150
To test a Message form in the Personal or Organizational Forms
Library 150
To test a Post form in a forms library in a folder 151
Release the Form 151
Where
To Go from Here 151
6 Controls, Fields, and
Properties 153
Set Control
Display Properties 154
To view the display properties for a control on the Vacation
Request form 154
Change Foreground and Background Colors 155
To set foreground and background colors for a control 155
Layer
Controls 156
To send a control to a back layer 156
To bring a control to a front layer 157
Set Advanced
Control Properties 157
To open the Advanced Properties window 157
Bind
a Control to an Existing Field 157
To bind a control to an existing field 158
Create
User-Defined Fields 160
To create a user-defined field 160
Location of User-Defined Fields 161
Specify Field Type 162
Changing Field Type 163
To change the type of a user-defined field 163
Specify Field Formats 163
Create Combination Fields 164
To create a Combination field 164
Create Formula Fields 167
To create a Formula field when you create the field 167
To specify that the field automatically calculates the result 168
Set Initial
Field Values 170
Validate
and Restrict Data 172
Specify That a Value Is Required for a Field 172
To specify that a value is required for a text field 172
Create Validation Formulas 173
To create a validation formula 174
Set Field-Specific
Properties 176
To Field 177
To set the initial value of the To field 177
To add a folder address to an Address Book in your profile 178
To Preaddress the To field to a folder 179
Subject Field 179
To specify the initial value of the Subject field 180
Message Field 181
To insert a file attachment or shortcut in the Message control 183
To insert an item in the Message control 183
To insert a folder shortcut in the Message control 184
To insert a URL shortcut in the Message control 184
To insert a hyperlink in the Message control 184
To insert an object in the Message control 186
About
the Control Toolbox 187
Set Control-Specific
Properties 188
To install Microsoft Outlook Visual Basic Reference 188
To use controls 189
Label Controls 189
To set the initial value of a Label control 190
TextBox Controls 190
To specify the Multi-Line option for a TextBox control 191
To specify the initial value for a TextBox control 191
Frame Controls 192
To add a Frame control 192
To add or remove controls from a Frame control 192
To change the caption of the Frame control 192
OptionButton Controls 192
To specify a caption for an OptionButton control 193
To bind an OptionButton control to a field 193
To set the Value property of an OptionButton control 194
To set the initial value of an OptionButton control 194
CheckBox Controls 194
To bind a CheckBox control to a field 195
To set the initial value of a CheckBox control 195
ComboBox Controls 195
To bind the ComboBox control to a field 196
To select a list type 196
To add values to the combo box list 196
To set the initial value of a ComboBox control 197
ListBox Controls 198
To bind the ListBox control to a field 198
To add values to the ListBox control 199
To set the initial value of a ListBox control 200
CommandButton Controls 200
To add a CommandButton control 201
To create a procedure for a CommandButton control 202
To test a CommandButton control Click procedure 202
MultiPage Controls 202
To add a MultiPage control 202
To add controls to the MultiPage control 202
To insert, rename, delete, or move a page 203
Image
Controls 204
To add a picture to an Image control 204
To delete the picture in the Image control 204
To size an image in the Image control 204
SpinButton Control 205
To add the TextBox control and bind it to a field 205
To add the SpinButton control and bind it to a field 206
Controls That Require VBScript 206
Using Custom ActiveX Controls 207
To add a Date Selection control to your custom Outlook form 207
Select Multiple Controls and the Dominant Control 209
Where
To Go from Here 209
7 Actions
211
Voting
Buttons for Message Forms 211
Overview of the Art Approval Form 212
Create the Art Approval Folder 212
To create the Art Approval folder 213
Create the Art Approval Form 214
To open the standard Message form 215
To preaddress the form 215
To set the initial value of the Subject field 215
To specify voting buttons 216
To specify the reply address 216
To specify where the Tracking item is stored 216
To publish the form 217
Test the Art Approval Form 219
To send the Art Approval form 219
To vote on the item 219
To open the response item in your Inbox 220
To open the Tracking item 220
Reply
Actions for Message Forms 221
To open the Vacation Request folder 221
Overview of the Vacation Request Application 221
To view a Vacation Request form 221
Actions for the Vacation Request Form 222
To view the Actions page for the Vacation Request form 223
To view the Approve Vacation action 224
To specify a form name 226
How Field Values Are Copied to the Reply Form 228
Vacation Request Reply Forms 230
Publish Reply Forms 231
To make a backup copy of a form 231
To open your backup copy of a form 231
To publish a form 232
Test the Forms 232
To publish the Vacation Request forms 232
To test the Vacation Request forms 233
Set the Hidden Properties for Response Forms 233
Reply
To Folder Actions for Post Forms 235
To open the Training Management folder 235
Overview of the Training Management Application 235
Actions for the Course Catalog Entry Form 237
To view the Actions page of the Course Catalog Entry form 237
To make the Reply To Folder action unavailable 239
To view the Create Offering action options 240
To specify a form name 241
How Field Values Are Copied to the Response Form 242
Create Response Forms 244
Publish the Forms to the Forms Library of the Folder 244
To make a backup copy of a form 244
To open your backup copy of a form 244
To publish a form in the forms library of a folder 245
Test the Forms 245
To test the forms in the Training Management application 245
Set the Hidden Property for Response Forms 246
To set the Hidden property for the Training Management Response forms 246
Where
To Go from Here 246
8 Folders
247
To open the Classified Ads folder 248
An Important
Reminder About Planning 248
Create
or Select a Folder 249
Choose Where to Design the New Folder 250
Create a Folder from Scratch 251
To create a folder 251
Directly Modify a Folder 252
To directly modify a Mailbox or public folder 252
Copy a Folder Design 253
To copy a folder design 253
Publish
Forms in the Folder 254
To publish a form in an Outlook folder 254
Manage Forms 255
To view the Forms page 256
To specify the types of items allowed in a public folder 256
To open the Forms Manager 257
To change the library in the left or right drop-down list box of the
Forms Manager 257
To copy a form to a folder 258
To delete a form 258
To update forms published in different forms libraries 258
To view the properties of a form 258
To set the Hidden property for a form 259
Design
Folder Views 259
Create a New View 260
To create a new view 260
To show only the custom views created for the folder 261
Create Columns 262
To add a column to a view 262
To remove a column from a view 262
To change the format properties of a column 264
To create a combination column 265
To change a combination column label or formula 266
To create a combination column showing only the value of the first
non-empty field 267
To create a formula column 267
To change a formula column label or formula 268
Group Items 269
To group items by using Customize Current View 269
To create groups by using the Group By box 270
Sort Items 271
To sort items 271
To group items by Conversation 273
To sort items by Conversation Index 274
Filter Items 274
To filter simple message properties 276
To filter by message class 277
To filter by a field value 278
Format Views 279
To format a view 279
In-Cell Editing Views 280
To enable in-cell editing and a new items row 280
Automatic Formatting 281
To create automatic formatting for individual messages in a view 281
View Performance 283
Use Folder
Home Pages 283
Folder Home Page Scenarios 284
Folder Home Page Considerations 286
To set a folder home page 286
Offline Use 287
To configure a folder home page for offline use 288
To establish offline Web page settings 289
Set General
Properties 290
To set general properties 291
To automatically generate Microsoft Exchange views 291
Test
Forms and Views 291
Copy
the Folder to Public Folders 292
To copy the folder to a new location 292
Specify
Internet Newsgroup 292
To set a Public Folder as a Newsgroup folder 292
Set Administration
Properties 293
To restrict access to the folder 293
Initial View On Folder 294
Drag/Drop Posting Is A 294
Add Folder Address to Personal Address Book 294
This Folder Is Available To 295
Folder Assistant 295
Moderated Folder 296
Set Permissions
296
To open the Permissions page 297
About Distribution Lists 297
To add a user, distribution list, or folder name to the Name list box 297
Assign Roles 298
To assign roles to users 298
To assign a custom role 299
Set Permissions for Subfolders 299
To use Exchange 5.0 or 5.5 300
To use Exchange 2000 300
Design
Rules 300
You can use rules to 301
To create rules 301
Specifying Conditions of a Rule 301
Rules Syntax 302
Specifying Simple Conditions 302
To specify simple conditions 302
Specifying Advanced Conditions 302
To specify advanced conditions 303
Specifying That a Rule Applies to Items That Do Not Match the Conditions
303
To specify that a rule applies only to items that do not match the conditions
303
Specifying Conditions with User-Defined Fields 303
To specify custom fields as conditions 303
Specifying Actions for a Rule 304
To specify an action to run when a condition is met 305
Make
the Folder Available for Offline Use 305
To create an offline folder file (.ost) 306
To specify folders for offline use 306
Test
and Release the Folder 307
To make the folder available to all users with access permission 307
Where
To Go from Here 308
PART IV BEYOND
THE BASICS
9 Raise Events and Move
to the Head of the Class 311
The VBA
Editor 312
Launching the VBA Editor 312
To open the Visual Basic for Applications Editor window 313
ThisOutlookSession Class Module 314
Navigating in the VBA Editor 314
The Outlook Application Object 315
To view or set references for Project1 316
Saving Your Outlook VBA Project 316
Securing Your Outlook VBA Project 317
To protect an Outlook VBA project 317
Writing
an Outlook Macro 318
To create a new Outlook Macro 319
To add an Outlook Macro to the Standard toolbar for the Explorer 320
To change your Macro Security settings 321
To run an Outlook Macro using the Macros dialog box 321
Writing
Code to Respond to Events 321
Use the WithEvents Keyword to Declare Object Variables 321
When You Must Use WithEvents to Declare the Outlook Application Object
322
Using WithEvents for Child Objects 322
Where to Instantiate Child Objects Declared Using WithEvents 325
Observing Events in the Example VBAProject.otm 326
To turn on event tracing in the VBAProject.otm example 326
Application
Events 326
ItemSend 327
NewMail 327
OptionsPagesAdd 328
Quit 329
Reminder 330
Startup 330
New Application Events in Outlook 2002 331
Reminders
Collection Events 332
BeforeReminderShow 333
ReminderAdd 333
ReminderChange 334
ReminderFire 334
ReminderRemove 334
Snooze 335
NameSpace
Events 335
OptionsPagesAdd 336
Explorers
Collection Events 337
NewExplorer 337
Explorer
Events 338
Activate 338
BeforeFolderSwitch 339
BeforeViewSwitch 339
Close 340
Deactivate 340
FolderSwitch 341
SelectionChange 342
ViewSwitch 342
New Explorer Events in Outlook 2002 343
SyncObject
Events 344
OnError 346
Progress 346
SyncEnd 347
SyncStart 347
OutlookBarPane
Events 347
BeforeGroupSwitch 348
BeforeNavigate 348
OutlookBarGroup
Events 348
GroupAdd 348
BeforeGroupAdd 349
BeforeGroupRemove 349
OutlookBarShortcut
Events 350
ShortcutAdd 350
BeforeShortcutAdd 350
BeforeShortcutRemove 351
Inspectors Collection Events 351
Exceptions to the NewInspector Event 351
NewInspector 355
Inspector
Events 356
Activate 356
Close 357
Deactivate 357
New Inspector Events in Outlook 2002 357
Folders
Collection Events 358
FolderAdd 358
FolderChange 359
FolderRemove 360
Views
Collection Events 361
ViewAdd 362
ViewRemove 362
Items
Collection Events 362
ItemAdd 363
ItemChange 364
ItemRemove 365
Item
Events 366
Adding Events to VBScript Behind Forms 368
To add or modify an event 369
The Firing Sequence of Events 370
Preventing Events from Firing 372
The AttachmentAdd Event 374
The AttachmentRead Event 374
The BeforeAttachmentSave Event 375
The BeforeCheckNames Event 375
The BeforeDelete Event 375
The Click Event 376
To create a Click event procedure 376
The Close Event 376
The CustomAction Event 376
The CustomPropertyChange Event 377
The Forward Event 377
The Open Event 377
The PropertyChange Event 378
The Read Event 379
Before you run this example, perform the following steps: 379
The Reply Event 380
The ReplyAll Event 380
The Send Event 381
The Write Event 381
Firing
Order of Events 381
Where
To Go from Here 382
10 The Outlook Development
Environment 383
The Outlook
E-Mail Security Update 383
Trusted
COM Add-Ins 384
Outlook
and VBA 384
VBScript
Versions 385
Determining the VBScript Version in Code 386
The Outlook
Script Editor 387
To view the Outlook Script Editor 387
An Introduction to Using the Script Editor 388
To create and test a PropertyChange event 388
Jumping to a Line of Code 389
To jump to a line of code 389
Troubleshooting
Code Using the Microsoft Script Editor 389
To install the Microsoft Script Editor 390
To launch the Microsoft Script Editor 390
Controlling How a Script Executes 392
Entering a Breakpoint 392
To set or remove a breakpoint 393
Entering Commands at Run Time 393
To enter script commands 393
Viewing the Call Stack 394
To view the call stack 394
Viewing the Locals Window 394
To view the Locals window 394
Viewing the Watch Window 395
To view the Watch window 395
To display the properties and property objects of the Item object 395
How to
Open an Item Containing VBScript 396
Information
Resources for Programming Outlook 2002 396
Web Resources 396
Sample Code 396
To open the VBScript Samples folder 397
Microsoft Outlook Visual Basic Reference Help 397
To use Microsoft Outlook Visual Basic Reference Help 397
A Caution About the Outlook Programming Environment 398
The Implied Item Object 399
To test this example 399
Object
Libraries 400
Helper Object Libraries 401
Using an Object Browser 402
To use the Outlook 2002 Object Browser to view the Forms Object Model 402
Moving Around in the Outlook Object Browser 402
To move around in the VBScript Object Browser 402
To display the Outlook VBA Object Browser 403
Object
Models 403
To view the Microsoft Outlook Object Model 405
To view the Microsoft Forms 2 Object Model 405
Using the Object Hierarchy 405
To test the code samples in the VBScript Samples folder 406
Getting and Setting Properties 407
Using Variables 408
Using the Variant Data Type 409
VBScript Naming Conventions 410
Declaring Constants 411
To add Outlook CONST declarations to your VBScript code 412
Assigning Objects to Variables 412
Referencing Collections and Single Objects 413
Where
To Go from Here 414
11 Using Visual Basic,
VBA, or VBScript with Outlook 415
To open the VBScript Samples folder 416
The Application
Object 416
Application Object Methods 417
To display the Query Builder page on the Filter dialog box 423
To build a filter using the Query Builder page on the Filter dialog box
423
The NameSpace
Object 426
NameSpace Object Methods 426
Properties of the NameSpace Object 427
The Outlook
Window (Explorer Objects) 430
Explorer Methods 431
Explorer Properties 431
The Panes
Collection Object 432
Determining Whether a Pane is Visible 433
The OutlookBarPane Object 434
The OutlookBarStorage
Object 434
The OutlookBarGroups
Collection Object 434
The OutlookBarGroup Object 435
The OutlookBarShortcuts
Collection Object 436
The OutlookBarShortcut Object 436
The CommandBars
Collection Object 437
To use the code in the VBA Samples folder 439
To run the PrintAllCBarInfo procedure 439
To run the CBShowButtonFaceIDs procedure 441
The CommandBar Object 445
The CommandBarControls
Collection Object 448
The CommandBarControl Object 449
To write an event procedure for a command bar control 457
The CommandBarButton Object 457
The CommandBarComboBox Object 458
The CommandBarPopup Object 459
The AddressLists
Collection Object 459
AddressLists Collection Methods 459
The AddressList
Object 460
The AddressEntries
Collection Object 460
AddressEntries Collection Methods 460
The AddressEntry Object 462
AddressEntry Object Methods 462
AddressEntry Properties 465
Using CDO to Obtain Recipients 466
Installing Collaboration Data Objects 467
To install Collaboration Data Objects 467
The Folders
Collection Object 468
Folders Collection Methods 468
The MAPIFolder
Object 469
MAPIFolder Object Methods 470
MAPIFolder Object Properties 470
The Views
Collection Object 475
The Items
Collection Object 476
Items Collection Object Methods 477
Items Collection Object Properties 481
The PostItem
Object 481
PostItem Object Methods 481
The MailItem
Object 483
MailItem Object Methods 483
MailItem and PostItem Objects Properties 486
The DocumentItem
Object 490
To add built-in document properties to a Folder View 495
To create an Expense Statement Document 495
To add custom document properties to a Folder View 496
The AppointmentItem
Object 496
Working with Recurring Appointments 497
The MeetingItem
Object 501
Working with Meeting Requests 501
The TaskItem
Object 505
TaskItem Object Methods 506
The TaskRequestItem
Object 507
Working with Task Requests 507
The ContactItem
and DistListItem Objects 509
ContactItem Object Methods 510
The JournalItem
Object 512
JournalItem Object Methods 513
The Item Window (Inspector Objects) 514
Inspector Object Methods 514
Inspector Object Properties 515
The Pages
Collection Object 516
The Page
Object 516
The Controls
Collection Object 517
Methods of the Controls Collection Object 517
Controls Collection Object Properties 518
The Control
Object 518
Properties of Control Objects 520
The UserProperties
Collection Object 525
UserProperties Collection Object Methods 526
The ItemProperties
Collection Object 526
The Recipients
Collection Object 527
Recipients Collection Object Methods 527
Automation
529
Where
To Go from Here 530
12 The Northwind Contact
Management Application 531
Overview
532
Outlook 2002 and Automatic Activity Journaling 535
A User Navigates to the Root Folder 536
A User Searches for a Company 537
Viewing Shared Activities 538
Custom Views on the Shared Activities Page 539
Viewing Sales Data in the Customer Form 540
Recording Shared Activities by Using Links 540
Shared Documents 542
Shared Appointments and Tasks 543
A User Sends Shared E-Mail 544
Setting
Up the Application 544
Copying the Application Folders to Public Folders 546
To copy the Northwind Contact Management Application folder 546
Restricting Access to the Application Folders 547
|