Tài liệu Module 7: Working with the Microsoft Outlook 2000 Object Model pptx

78 500 0
Tài liệu Module 7: Working with the Microsoft Outlook 2000 Object Model pptx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Module 7: Working with the Microsoft Outlook 2000 Object Model Contents Overview Using the Application Object Using the NameSpace Object 11 Using the MAPIFolder Object 19 Working with Outlook 2000 Items Programmatically 28 Using the Explorer Object 40 Using the Inspector Object 51 Working with the Outlook Bar 57 Lab A: Creating Address Labels by Using the Word Object Model 65 Lab B: Adding an Outlook Bar Group and Outlook Bar Shortcuts 69 Review 73 Information in this document is subject to change without notice The names of companies, products, people, characters, and/or data mentioned herein are fictitious and are in no way intended to represent any real individual, company, product, or event, unless otherwise noted Complying with all applicable copyright laws is the responsibility of the user No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Microsoft Corporation If, however, your only means of access is electronic, permission to print one copy is hereby granted Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property  1999 Microsoft Corporation All rights reserved Microsoft, Active Desktop, Active Directory, ActiveX, BackOffice, Developer Studio, FrontPage, JScript, MSDN, MSN, NetMeeting, Outlook, PivotChart, PivotTable, PowerPoint, Visual Basic, Visual C++, Visual FoxPro, Visual InterDev, Visual J++, Visual SourceSafe, Visual Studio, Windows, Windows Media, and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the U.S.A and/or other countries The names of companies, products, people, characters, and/or data mentioned herein are fictitious and are in no way intended to represent any real individual, company, product, or event, unless otherwise noted Other product and company names mentioned herein may be the trademarks of their respective owners Project Advisor: Janet Wilson Project Lead and Instructional Designer: Anne Bockman (Excell Data Corporation) Instructional Designers: Josh Barnhill (Volt Technical) and Jo Berry (Exchange) Lead Program Manager: Greg Bott Program Managers: Colleena Carr and Chris Boar (Intl Vendor) Graphic Artist: Andrea Heuston (Artitudes Layout and Design) Editing Manager: Lynette Skinner Editor: Jennifer Kerns (S&T Onsite) Copy Editor: Shari G Smith (R & S Consulting) Online Program Manager: Arlo Emerson (Aditi) Production Support: Irene Barnett (Barnett Communications) Manufacturing Manager: Bo Galford Manufacturing Support: Mimi Dukes (S&T Onsite) Development Services: Kimber Dodge Lead Product Manager: Mary Larson Group Product Manager: Robert Stewart Module 7: Working with the Microsoft Outlook 2000 Object Model iii Instructor Notes Module 7: Working with the Microsoft Outlook 2000 Object Model Presentation: 90 Minutes Labs: 60 Minutes This module provides students with a detailed understanding of the Microsoft® Outlook® 2000 object model At the end of this module, students will be able to use Outlook development tools and the Outlook 2000 object model to develop components of collaborative applications Materials and Preparation This section provides you with the materials and preparation needed to teach this module Materials To teach this module, you need the following materials: Microsoft PowerPoint® file 1593a_07.ppt Module 7, “Working with the Microsoft Outlook 2000 Object Model” Preparation To prepare for this module, you should: Read all the materials for this module Read the instructor notes and margin notes for the module Complete the labs Rehearse the demo iv Module 7: Working with the Microsoft Outlook 2000 Object Model Module Strategy Use the following strategy to present this module: Using the Application Object Describe the properties and methods of the Application object and explain how to use them in an application Explain how to handle the events of the Application object Using the NameSpace Object Describe the methods and properties of the NameSpace object and explain how to use them in an application Using the MAPIFolder Object Describe the methods and properties of the MAPIFolder object and explain how to use them in an application Working with Outlook 2000 Items Programmatically Explain how to reference items and limit the number of items returned by using filtering Describe how to create new items by using the CreateItem method of the Application object and Add method of the Items collection, and explain the difference between these two methods Using the Explorer Object Explain how to use the properties, methods, and events of the Explorer object Using the Inspector Object Explain how to use the properties and methods of the Inspector object Working with the Outlook Bar Provide an introduction to the Outlook Bar objects Describe how to return an OutlookBarPane object Explain how to add both a new group and a new shortcut to the Outlook Bar Module 7: Working with the Microsoft Outlook 2000 Object Model Overview Slide Objective To provide an overview of the module topics and objectives Using the Application Object Lead-in Using the NameSpace Object In this module, you will learn how to program the methods, events, and properties of the Outlook object model to add functionality to your collaborative applications Using the MAPIFolder Object Working with Outlook 2000 Items Programmatically Using the Explorer Object Using the Inspector Object Working with the Outlook Bar At the end of this module, you will be able to: Incorporate support for Application object methods, events, and properties in a collaborative application Create new Microsoft® Outlook® 2000 items by using the Items collection Incorporate methods and properties of the NameSpace object in a collaborative application Incorporate methods and properties of the MAPIFolder object in a collaborative application Incorporate support for Explorer object methods, events, and properties in a collaborative application Incorporate support for Inspector object methods, events, and properties in a collaborative application Return an OutlookBarPane object and add a new group and a new shortcut to the Outlook Bar in a collaborative application Module 7: Working with the Microsoft Outlook 2000 Object Model Using the Application Object Slide Objective To show the Application object in relation to other Outlook 2000 objects Lead-in Use the Application object to access other objects in the Outlook 2000 object hierarchy, new Outlook 2000 items, and active interface objects Application NameSpace Folders (MAPIFolder) Items (Item) Explorers (Explorer) Inspectors (Inspector) The Application object represents the entire Microsoft Outlook 2000 application and has several purposes: As the root object, it allows access to other objects in the Outlook 2000 hierarchy It allows direct access to a new Outlook 2000 item created by using the CreateItem method, without having to traverse the object hierarchy It allows access to the active interface objects (the Explorer and Inspector objects) Note If you develop with Outlook 2000 and previous versions of Outlook 2000, you may want to read the “What’s New for Microsoft Outlook 2000 Developers” article in Outlook 2000 Microsoft Visual Basic® for Applications Help Module 7: Working with the Microsoft Outlook 2000 Object Model Referencing the Outlook 2000 Application Object Slide Objective To present an outline of this topic Lead-in You can control functions of Outlook 2000 from within another application by using automation Using the Application Object from Within a Form Using the Application Object from Within Visual Basic Using the Application Object from Within Visual Basic for Applications Within Outlook 2000 Using the Application Object from Within a Folder Home Page You can use automation to control Outlook 2000 from another application Automation is a process that integrates two or more components in a way that appears seamless to the user Only one instance of the Outlook 2000 application executable file may be running at a given time The only object you can create in the Outlook object model is the Application object This object resides at the top of the object model Using the Application Object from Within a Form From within an Outlook 2000 form, you must use the Application property of the Item object to retrieve a reference to the Outlook 2000 application Set objApp = Item.Application Using the Application Object from Within Visual Basic When using Visual Basic, you can use the CreateObject function to return a reference to the Outlook 2000 application This is also true when using Visual Basic for Applications from within applications other than Outlook 2000 The following example shows how to use the CreateObject function to return a reference to the Outlook 2000 Application object Dim objApp As Outlook.Application Set objApp = CreateObject("Outlook.Application") Module 7: Working with the Microsoft Outlook 2000 Object Model Alternatively, you can set a reference to the Outlook object model and then return a reference to the Outlook 2000 application by using the New keyword This approach, as demonstrated in the following example, takes advantage of early binding Dim objApp As Outlook.Application Set objApp = New Outlook.Application Using the Application Object from Within Visual Basic for Applications Within Outlook 2000 The Application object is provided as an intrinsic object to your Visual Basic for Applications project when working in Outlook 2000 You can refer to the Outlook 2000 application simply by using the word Application Using the Application Object from Within a Folder Home Page In a folder home page, you can access the Outlook 2000 application by using a Microsoft Internet Explorer document object property, as shown in the following example Dim objApp Set objApp = Window.External.OutlookApplication Module 7: Working with the Microsoft Outlook 2000 Object Model Using Application Object Properties and Methods Slide Objective To identify methods and properties of the Application object that you can use to accomplish common tasks Lead-in Use the Explorers and Inspectors properties to return the Explorers and Inspectors collections, respectively; and use the ActiveWindow method to return the active window Returning the Explorers and Inspectors Collections Explorers property and Inspectors property Returning the COMAddIns Collection COMAddIns property Returning the Active Window ActiveWindow method Returning the NameSpace Object GetNameSpace method You can use properties and methods of the Application object to accomplish certain programming tasks, such as returning the active window and returning the Explorers and Inspectors collections Returning the Explorers and Inspectors Collections The Explorers collection contains a set of Explorer objects representing all Explorer objects An Explorer object need not be visible as a window to be included in the collection The Inspectors collection contains a set of Inspector objects representing all Inspectors objects An Inspector need not be visible as a window to be included in the collection Returning the Explorers Collection The Explorers property returns the Explorers collection The following example shows how to retrieve the Explorers collection Set objExplorers = objApp.Explorers Returning the Inspectors Collection Use the Inspectors property to return the Inspectors collection from the Application object The following example shows how to retrieve the Inspectors collection Set objInspectors = objApp.Inspectors Module 7: Working with the Microsoft Outlook 2000 Object Model Returning the COMAddIns Collection Use the read-only COMAddIns property of the Application object to return the COMAddIns collection, which represents all the Component Object Model (COM) add-ins currently loaded in Outlook 2000 Use the following syntax: objApplication.COMAddIns, where objApplication is a required expression that returns an Application object The following Visual Basic example displays the number of COM add-ins currently connected Dim objApp As New Outlook.Application Private Sub cmdCount_Click() MsgBox "There are " & objApp.COMAddIns.Count & " COM add-ins." End Sub If you use Visual Basic, Scripting Edition (VBScript), you not declare an Application object variable The following example shows how to perform the same task by using VBScript Sub cmdCount_Click() MsgBox "There are " & Item.Application.COMAddIns.Count & " COM add-ins." End Sub Returning the Active Window The ActiveWindow method returns the object that represents the topmost Outlook 2000 window on the desktop The return type for this object can be either an Explorer object or an Inspector object If no Explorer or Inspector window is open, this method returns nothing Use this method to determine the state of that object The following code shows you how to use the ActiveWindow method: Set objWindow = objApp.ActiveWindow If Not (objWindow Is Nothing) Then If objWindow.Class = olExplorer Then strTop = "Explorer" ElseIf objWindow.Class = olInspector Then strTop = "Inspector" End If MsgBox "The topmost object is a(n) " & strTop & " object." End If 60 Module 7: Working with the Microsoft Outlook 2000 Object Model OutlookBarPane Object Properties The following table describes the four properties used most frequently on the OutlookBarPane object Property Description Contents This read-only property returns the OutlookBarStorage object for the current OutlookBarPane object From the returned object, you can retrieve the shortcuts and groups for the Outlook Bar CurrentGroup This property returns or sets the current group displayed in the Outlook Bar You must pass a valid OutlookBarGroup object as the value for this property Name This read-only property returns a string that indicates the name of the current OutlookBarPane object Visible This property returns or sets the visibility of the OutlookBarPane object This property takes a Boolean value that specifies whether you want to show the Outlook Bar in the UI The following code shows you how to use the OutlookBarPane object in your application: Dim objPanes As Outlook.Panes Dim objOutlookBarPane As Outlook.OutlookBarPane Set objPanes = objExplorer.Panes Set objOutlookBarPane = objPanes("OutlookBar") ' Toggle whether the pane is visible or not objOutlookBarPane.Visible = Not (objOutlookBarPane.Visible) OutlookBarPane Object Events The OutlookBarPane object also provides two events that you can capture when users work with the Outlook Bar These events are described in the following table Event Description BeforeGroupSwitch This event is fired whenever the user or object model attempts to switch to a new visible group The BeforeGroupSwitch event procedure takes two parameters, Group and Cancel If you set the Cancel parameter to True, the switch is canceled The Group parameter is an OutlookBarGroup object containing the Outlook 2000 group to which the user is trying to navigate BeforeNavigate This event fires when the user clicks on an Outlook Bar shortcut The BeforeNavigate event procedure takes two parameters, Shortcut and Cancel Shortcut is an OutlookBarShortcut object—the Outlook Bar shortcut to which the user is trying to navigate—and Cancel is a Boolean, which you can set to True to cancel the navigation Module 7: Working with the Microsoft Outlook 2000 Object Model 61 Adding a New Group to the Outlook Bar Slide Objective To identify the properties, collections, and events of Outlook Bar objects that you can use to add a new group to the Outlook Bar Scrolling Through Groups on the Outlook Bar Lead-in Counting and Adding Groups to the Outlook Bar You can add a new group to the Outlook Bar within your application, include code to scroll through, count, and add groups to the Outlook Bar, as well as track users who add or remove Outlook groups Groups property of the OutlookBarStorage object OutlookBarGroups collection Tracking Users Who Add or Remove Outlook Groups BeforeGroupAdd, BeforeGroupRemove, and GroupAdd events of the OutlookBarGroups collection You can work with existing Outlook Bar groups, add new groups, or track users who add or remove groups Scrolling Through Groups on the Outlook Bar The OutlookBarStorage object is a container for the objects in an OutlookBarPane object This object contains only one property, Groups, which you can use in your applications The Groups property returns an OutlookBarGroups collection, which enables you to scroll through the groups on the Outlook Bar The following code shows you how to use the Groups property to retrieve the OutlookBarGroups collection and then scroll through each group in the collection Dim objOutlookBarStorage As Outlook.OutlookBarStorate Dim objOutlookBarGroups As Outlook.OutlookBarGroups Dim objOutlookBarGroup As Outlook.OutlookBarGroup Set objPanes = objExplorer.Panes Set objOutlookBarPane = objPanes("OutlookBar") Set objOutlookBarStorage = objOutlookBarPane.Contents Set objOutlookBarGroups = objOutlookBarStorage.Groups strGroups = vbLf For Each objOutlookBarGroup In objOutlookBarGroups strGroups = strGroups & vbLf & objOutlookBarGroup.Name Next MsgBox "The names of the groups on your Outlook Bar: " & strGroups 62 Module 7: Working with the Microsoft Outlook 2000 Object Model Counting and Adding Groups to the Outlook Bar The OutlookBarGroups collection contains OutlookBarGroup objects that represent all the Outlook groups on your Outlook Bar Use this collection to count and add new groups to the Outlook Bar This collection supports one property, Count, which you can use to retrieve the number of groups in the collection, as shown in the following code: Set objPanes = objExplorer.Panes Set objOutlookBarPane = objPanes("OutlookBar") Set objOutlookBarStorage = objOutlookBarPane.Contents Set objOutlookBarGroups = objOutlookBarStorage.Groups MsgBox "The number of Outlook groups on your Outlook " _ & "Bar is:" & objOutlookBarGroups.Count OutlookBarGroups Collection Methods The OutlookBarGroups collection also supports three methods, as described in the following table Method Description Add Adds a new, empty OutlookBarGroup object to the collection and returns a reference to the new OutlookBarGroup object The Add method takes two parameters: one is a string that specifies the name of the group to add; the other is optional and specifies a number indicating the insertion position for the new Outlook group The top of the bar is at position Item Allows you to retrieve an OutlookBarGroup object by name or by index number Remove Allows you to delete an OutlookBarGroup object by specifying the index of the object you want to remove Tracking Users Who Add or Remove Outlook Groups The OutlookBarGroups collection supports three events: BeforeGroupAdd, BeforeGroupRemove, and GroupAdd These three events enable you to track when users try to add or remove certain Outlook groups and, if you want, to stop the user from removing or adding an Outlook group Note that if the BeforeGroupAdd event is used, there is no way for an administrator to know which group the user is trying to add However, since the GroupAdd event passes the group the user added, you can write code in that event procedure to prevent the user from adding the group if they are not allowed to add it Module 7: Working with the Microsoft Outlook 2000 Object Model 63 Adding a New Shortcut to a Group Slide Objective To identify the properties and methods of Outlook Bar objects that you can use to add new shortcuts to Outlook groups Accessing Information About an Outlook Group OutlookBarGroup object Lead-in Name, Shortcuts, and ViewType properties Use properties of the OutlookBarGroup object to access information about an Outlook group, and then use the Add method of the OutlookBarShortcuts collection to add new shortcuts to the Outlook group Adding Outlook Bar Shortcuts OutlookBarShortcuts collection Add, Item, and Remove methods To access information about an Outlook group, you can use properties of the OutlookBarGroup object To add new shortcuts to the Outlook group, you can use the Add method of the OutlookBarShortcuts collection Accessing Information About an Outlook Group The OutlookBarGroup object represents an Outlook group on the Outlook Bar The OutlookBarGroup object supports three properties and no methods You can use these three properties to access information about the Outlook group as well as shortcuts inside the Outlook group Property Description Name This property returns or sets the name of the OutlookBarGroup object by using a string Shortcuts This property returns the set of Outlook shortcuts contained in the group as an OutlookBarShortcuts collection ViewType This property returns or sets the way icons are displayed in the Outlook Bar This property can be two values, either olLargeIcon or olSmallIcon 64 Module 7: Working with the Microsoft Outlook 2000 Object Model Adding Outlook Bar Shortcuts The OutlookBarShortcuts collection contains a set of OutlookBarShortcut objects and represents the shortcuts in an OutlookBarGroup object This collection supports the Count property, which returns the number of OutlookBarShortcut objects in the collection Note Adding shortcuts to file system files will cause an error You cannot programmatically specify the icon associated with a shortcut The OutlookBarShortcuts collection also supports three methods so that you can manipulate it, as described in the following table Method Description Add Allows you to create a new shortcut in your Outlook group The return value for the Add method is the new OutlookShortcut object you created This method takes three parameters The first parameter is a variant (a datatype that can contain either numeric or string information) that is the target for the shortcut The target can be either a MAPIFolder object or a string that specifies a URL The second parameter is a string that specifies the name of the shortcut you are creating The final parameter is an optional parameter that specifies the insertion position of the new shortcut Item Allows you to specify the index number or the name of the shortcut you want to retrieve from the collection Remove Allows you to remove a shortcut from the collection The following example adds both a folder and a URL shortcut to a newly created Outlook group by using the Add method: 'Create the new group at the top of the bar Set objNewOLBarGroup = objOutlookBarGroups.Add "My New Group", 'Get the shortcuts in the new group Set objOutlookBarShortcuts = objNewOLBarGroup.Shortcuts 'Now add a shortcut that points to a Folder Set objFolder = objNS.GetDefaultFolder(olFolderInbox) 'Optionally, set a varialbe to retrive the 'new shortcut at the end means add it to the 'top of the group Set objNewShortcut = objOutlookBarShortcuts.Add objFolder, "My Inbox", 'Now create a new shortcut to a web page strExHTTP = "http://www.mircrosoft.com/exchange" objOutlookBarShortcuts.Add strEXHTTP, "Exchange web site" Module 7: Working with the Microsoft Outlook 2000 Object Model 65 Lab A: Creating Address Labels by Using the Word Object Model Slide Objective To introduce the lab Lead-in In this lab, you will create a program that creates labels for a specified user from within Outlook 2000 by using the Word Object Model Explain the lab objectives Objective After completing this lab, you will be able to: Install a Microsoft Visual Basic for Applications project file Complete Visual Basic for Application code by using the Visual Basic Editor from within Microsoft Outlook 2000 Test a Visual Basic for Applications project from within Outlook 2000 Prerequisites This lab is dependent upon the completion of: Lab A, “Configuring the MoveApp Development Environment,” in module of course 1593, Building Collaborative Solutions by Using Microsoft Outlook 2000 Lab A, “Creating the Public Folder Hierarchy for the MoveApp,” in module of this course Scenario One of the requirements of MoveApp is to enable Kevin Kennedy, the administrator, to print labels Employees scheduled to move label the components and items that will be moved To meet this requirement, you will complete a Visual Basic for Applications project that prints labels for a specified user from within Outlook 2000 The project will use the Word Object Model Estimated time to complete this lab: 30 minutes 66 Module 7: Working with the Microsoft Outlook 2000 Object Model Exercise Installing the VBA Project File In this exercise, you will install a Visual Basic for Applications project file to use with Outlook 2000 The project file contains a partially completed macro that generates labels for employees participating in a particular move To install a VBA project file If Outlook is running, close it Verify that you are logged on as the Administrator On the taskbar, click Start, and then click Run The Run dialog box appears In the Open text box, type :\Moc\1593a\LabFiles\Lab07a The Lab07a window appears Note Replacing the otm file in this directory deletes all existing Outlook 2000 macros contained in the previous otm file Copy Vbaproject.otm to :\Winnt\Profiles\Administrator\Application Data\Microsoft\Outlook folder If Vbaproject.otm already exists in the Outlook folder, replace the existing file with the new file Close all windows Module 7: Working with the Microsoft Outlook 2000 Object Model Exercise Completing the Label Printing Macro In this exercise, you will complete the code that will enable users of MoveApp to create and print the moving labels To complete the Create_Labels procedure Start Outlook 2000 On the Tools menu, point to Macro, and then click Visual Basic Editor A warning appears asking if you want to enable or disable macros Click Enable Macros The Visual Basic Editor starts On the View menu, click Project Explorer Double-click ExpClass to edit the code contained in the class module Lines prefixed with the text *** indicate where a line of code needs to be added Follow the instructions in the comments after the *** symbol Exit the Visual Basic Editor If you are prompted to save changes to Vbaproject.otm, click Yes 67 68 Module 7: Working with the Microsoft Outlook 2000 Object Model Exercise Testing the Label Printing Macro In this exercise, you will verify that the Create_Labels procedure functions correctly by generating labels To test the label printing macro In Outlook 2000, in the folder list, locate and select the Public Folders\All Public Folders\Business Functions\MoveApp\Employee Moves folder Switch the view to Labels Not Printed Notice that the Print Labels button appears on the Advanced toolbar Click Print Labels The procedure may take up to 30 seconds to complete Verify that the Create_Labels procedure worked correctly Close Outlook 2000 A Microsoft Word document opens with the labels formatted as shown in the following illustration Exit Word and when prompted, not save your changes Module 7: Working with the Microsoft Outlook 2000 Object Model 69 Lab B: Adding an Outlook Bar Group and Outlook Bar Shortcuts Slide Objective To introduce the lab Lead-in In this lab, you will add an Outlook Bar group that contains Outlook Bar shortcuts to MoveApp Explain the lab objectives Objectives After completing this lab, you will be able to: Write VBScript that manipulates ActiveExplorer panes Write VBScript that creates an Outlook Bar group and shortcuts Prerequisites This lab is dependent upon the completion of: Lab A, “Configuring the MoveApp Development Environment,” in module of course 1593, Building Collaborative Solutions by Using Microsoft Outlook 2000 Lab A, “Creating the Public Folder Hierarchy for the MoveApp,” in module of this course Scenario Two requirements of the MoveApp application are to notify users that it is complete and then enable users to quickly view the status of their move The Employee Move Application Form provides this functionality The form can be sent to all Northwind Traders employees The form informs users that MoveApp is complete and creates a new Outlook Bar group that contains new Outlook Bar shortcuts Estimated time to complete this lab: 30 minutes 70 Module 7: Working with the Microsoft Outlook 2000 Object Model Exercise Completing Code in the Employee Move Application Release Form In this exercise, you will complete the VBScript code within the Employee Move Application Release form, and then you will publish the form This form will be sent to everyone in the organization It will inform each user that MoveApp is complete and also create for them a new Outlook Bar group and shortcuts To open the form template file Verify you are logged on as the administrator Start Outlook 2000 If the warning dialog box appears asking if you want to enable macros, click Enable Macros On the Tools menu, point to Forms, and then click Design a Form The Design Form dialog box appears In the Look In list, click User Templates in File System Click Browse The Go To Folder dialog box appears Select :\Moc\1593a\Labfiles\Lab07B, where is the drive where the MOC files are installed, and then click OK In the Design Form dialog box, click MoveApp_Release, and then click Open The warning dialog box appears asking if you want to enable macros Click Enable Macros The Employee Move Application is released! form appears in design mode To complete the VBScript code in the form On the Form menu, click View Code The Script Editor starts Each change that you are to make is marked with the text *** On the Edit menu, click Find The Find dialog box appears In the Find what box, type *** and then click Find Next Read the comment, which is preceded by the text “***” On the blank line immediately after the comment, add or modify code as stated in the comment Repeat steps – until you have added or modified code as stated in each comment Close the Script Editor Module 7: Working with the Microsoft Outlook 2000 Object Model 71 To publish the form In the Employee Move Application is released! form, on the Tools menu, point to Forms, and then click Publish Form As The Publish Form As dialog box appears In the Look In list, click Organizational Forms Library In the Display name box, type Employee Move Application Release Click Publish Close the Employee Move Application is released! form without saving changes 72 Module 7: Working with the Microsoft Outlook 2000 Object Model Exercise Testing the Employee Move Application Release Form In this exercise, you will send the Employee Move Application Release form to yourself You will then use the Setup button on the form to install the Employee Move Application Outlook Bar group and shortcuts To send the Employee Move Application Release form In Outlook, on the File menu, point to New, and then click Choose Form The Choose Form dialog box appears Click Employee Move Application Release Click Open The Employee Move Application Release form appears In the To box, type Administrator In the body of the message, type The MoveApp is ready to use Click Send If the Spelling dialog box appears, resolve any spelling errors in your message The e-mail message is sent to your Inbox and the form closes To install the Outlook Bar group and shortcuts In Outlook, on the View menu, point to Go To, and then click Inbox To open the new message, double-click the message whose subject line is “Employee Move Application is released!” Verify that no Outlook Bar group named MoveApp exists Click Setup Click OK Close the form The MoveApp group is added to your Outlook Bar The Personal Move Status and Employee Moves shortcuts are added to the MoveApp group To test the shortcuts On the Outlook Bar, click the MoveApp group Click the Personal Move Status shortcut The MoveApp folder appears (In another lab in this course, you will create a Folder home page that displays your personal move status.) On the Outlook Bar, click the Employee Moves shortcut The Employee Moves folder appears Close Outlook 2000 Module 7: Working with the Microsoft Outlook 2000 Object Model 73 Review Slide Objective To reinforce module objectives by reviewing key points Using the Application Object Using the NameSpace Object Lead-in The review questions cover some of the key concepts taught in the module Using the MAPIFolder Object Working with Outlook Items Programmatically Using the Explorer Object Using the Inspector Object Working with the Outlook Bar A collection of Explorers, Inspectors, and COM Add-ins are all available from which object in the Outlook object library? Application How would you reference the Outlook 2000 Application object from a folder home page? Window.External.OutlookApplication What event is fired when a message arrives in the inbox? Application_NewMail What is the name of the property that returns all the messages in a particular folder? Items You can reference a message in an Items collection by position or by what? Subject 74 Module 7: Working with the Microsoft Outlook 2000 Object Model Using SetColumns can increase what in your application? Speed What method of the Application object allows you to create the standard Outlook 2000 items? CreateItem What method allows you to create custom forms, and where would you find it? Add method of any folders Items collection Which object beneath the Application object represents the root of the storage system? The NameSpace object 10 What events of the Folders collection can be trapped? FolderAdd, FolderChange, and FolderRemove 11 What method of the MAPIFolder object returns an associated Explorer object? GetExplorer 12 What property of the Explorer object returns a collection of the items in the Explorer that are currently selected? Selection ... Product Manager: Robert Stewart Module 7: Working with the Microsoft Outlook 2000 Object Model iii Instructor Notes Module 7: Working with the Microsoft Outlook 2000 Object Model Presentation: 90 Minutes... application 2 Module 7: Working with the Microsoft Outlook 2000 Object Model Using the Application Object Slide Objective To show the Application object in relation to other Outlook 2000 objects Lead-in... Outlook 2000 Module 7: Working with the Microsoft Outlook 2000 Object Model 11 Using the NameSpace Object Slide Objective To show the NameSpace object in relation to other Outlook 2000 objects Lead-in

Ngày đăng: 10/12/2013, 16:15

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan