1. Trang chủ
  2. » Công Nghệ Thông Tin

Module 3: Creating Forms by Using Microsoft Outlook 2000

94 316 0
Tài liệu đã được kiểm tra trùng lặp

Đ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

Thông tin cơ bản

Tiêu đề Creating Forms by Using Microsoft Outlook 2000
Người hướng dẫn Janet Wilson, Anne Bockman (Excell Data Corporation), Josh Barnhill (Volt Technical), Jo Berry (Exchange), Greg Bott, Colleena Carr, Chris Boar (Intl Vendor), Andrea Heuston (Artitudes Layout and Design), Lynette Skinner, Jennifer Kerns (S&T Onsite), Shari G. Smith (R & S Consulting), Arlo Emerson (Aditi), Irene Barnett (Barnett Communications), Bo Galford, Mimi Dukes (S&T Onsite), Kimber Dodge
Trường học Microsoft Corporation
Chuyên ngành Information Technology
Thể loại Lecture Notes
Năm xuất bản 1999
Định dạng
Số trang 94
Dung lượng 1,29 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Explain how to avoid common design mistakes for Outlook 2000 forms that will be converted into Web forms by using the Outlook HTML Form Converter.. Overview Introduction to Outlook 2000

Trang 1

Contents

Overview 1

Introduction to Outlook 2000 Forms 2

Building a Simple Outlook 2000 Form 10

Lab A: Building the Computer Services

Review 88

Module 3: Creating Forms by Using

Microsoft Outlook 2000

Trang 2

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

Trang 3

Instructor Notes Module 3: Creating Forms by Using

Microsoft Outlook 2000

This module shows students how to develop simple and complex custom forms

by using Microsoft® Outlook® 2000

At the end of this module, students will be able to build simple forms that use fields, standard controls, and Microsoft ActiveX® controls, and set form and control properties Students will be able to describe how data is stored with an item and how controls are bound to fields Students will be able to work with fields and define custom fields for their forms They will also learn about form actions and how default and custom actions can be used Students will be able

to create custom forms that are based on Microsoft Office documents Finally,

they will learn how to save a form and make it available to other users

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_03.ppt

 Module 3, “Creating Forms by Using Microsoft Outlook 2000”

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 lab

 Rehearse the practices

 Rehearse the demonstration

Presentation:

150 Minutes

Lab:

60 Minutes

Trang 4

Module Strategy

Use the following strategy to present this module:

 Introduction to Outlook 2000 Forms Provide an introduction to Outlook 2000 forms by describing the various form types Then, describe the various elements that students can use to customize forms Most of these elements are described in this module, while others (scripting and the Script Editor) are described in subsequent modules Define the purpose of the message class

 Building a Simple Outlook 2000 Form Describe how to build a simple Outlook 2000 form by using the Outlook Form Designer Explain how to avoid common design mistakes for Outlook 2000 forms that will be converted into Web forms by using the Outlook HTML Form Converter

 Working with Controls Explain how to perform advanced customization by setting standard and advanced control properties, setting the tab order of controls on a form, and binding standard and ActiveX controls to form fields

 Working with Fields Describe three types of custom fields and how they are created: simple, formula, and combination fields Provide an overview of how to restrict field access by using scripting Describe how to ensure that users enter values or valid data into fields by using field validation

 Performing Actions Describe how to invoke forms through actions performed by users and how

to create custom reply forms

 Using Office Document Forms Show how to use a Microsoft Office document within a form

 Persisting Form Design Describe how to test, save, and publish a form Define the forms cache and demonstrate how to clear the forms cache Explain how to use the

MessageClass property of an item, and the DefaultItemType and DefaultMessageClass properties of a folder to control how a solution views

and edits items

Trang 5

Overview

 Introduction to Outlook 2000 Forms

 Building a Simple Outlook 2000 Form

 Working with Controls

 Working with Fields

 Performing Actions

 Using Office Document Forms

 Persisting Form Design

At the end of this module, you will be able to:

 Select the type of Microsoft® Outlook® 2000 form that is most appropriate for a given scenario

 Create a new form by setting form properties, adding standard and Microsoft ActiveX® controls, and setting their properties

 Bind controls to fields

 Define custom formula and combination fields for a form and use field validation

 Create a Reply form that controls how users reply to a form

 Create a new form that is based on a Microsoft Office document

 Save and publish a form so that it is available to other users

In this module, you will learn

about building custom forms

in Outlook 2000

Trang 6

 Introduction to Outlook 2000 Forms

 Types of Outlook 2000 Forms

 Outlook 2000 Form Components

 Introduction to the Message Class

Outlook 2000 provides a number of built-in form types that can be customized Recognizing these types and understanding their specific capabilities can save development time by taking advantage of the built-in functionality of each form type

Outlook 2000 also provides tools that you can use to customize forms You can use these tools to add additional controls and fields to forms, to respond to user activity, or to add script code to further customize the built-in forms

When working with forms in the Outlook 2000 design environment, you have

to base the design of custom forms on built-in forms Unlike Microsoft Visual Basic® forms, it is impossible and unnecessary to start with a blank Outlook 2000 form Because an Outlook 2000 form will always be sent or posted, you always start with a Send form or a Post form After you customize your form, you can publish it When you publish your form, a message class is automatically generated by Outlook 2000 from the form name and is assigned with the form The message class is an internal identifier used by Outlook 2000 and Microsoft Exchange Server to locate and activate a form When a form with that message class is selected, Outlook 2000 loads and displays an instance of that form

Slide Objective

To outline this topic

Lead-in

There are a variety of form

types and customization

tools you can use to build

Outlook 2000 forms

Trang 7

Types of Outlook 2000 Forms

 Mail Message Forms

 Post Forms

 Modifying Other Built-In Forms

task

 Office Document Forms

document

You can create custom forms more efficiently when you fully understand the different types of forms that are available The design environment for Outlook 2000 forms is called the Outlook Form Designer Another term used to describe the design environment is “design mode.” The Outlook Form Designer provides the following form types as a starting point for a new custom form

Mail Message Forms

Use the mail message form to build custom forms for structuring information, requesting services, or collecting information When you use a mail message form, you inherit all the built-in capabilities of the form, such as automatic name resolution and nickname support, and most fields on the form can be customized The only field that your new form will inherit that cannot be

changed is the Send button at the top of the form With a mail message form, a

user can send information to another user, distribution list (DL), or folder within a site or across the Internet

You should base your custom form on a mail message form when you need the ability to send information across the e-mail system

The following are examples of custom mail message forms that can be developed with the Outlook Form Designer:

 Request forms Use these forms for purchase orders, copier services,

business cards, travel requests, and so on

 Survey forms Use these forms to collect feedback from coworkers For

example, an Employee Satisfaction Survey form enables Outlook 2000 users to provide feedback by filling in the form, and then routing the form to the Employee Satisfaction public folder

 Report forms Use these forms to structure and distribute information For

example, status reports, weekly time sheet forms, or mileage reports

Outlook 2000 comes with a

variety of forms that you can

customize for your specific

needs

Trang 8

Post Forms

Most collaborative solutions make use of the post form The post form is best used in an application that posts and retrieves messages in a public folder The following are examples of custom post forms:

 Forms for a technical user group Use these forms to enable users to submit

problems and solutions to problems, as well as to review and respond to submitted problems

 Product wish list forms Use these forms to submit ideas and requests to a

Suggestions folder and to respond to suggestions Product planners can then review the folder for new product ideas

 Help desk System Use these forms to post help desk requests to a public

folder Help desk technicians can update the information in each request or mark it as resolved Concurrently, users can view the status of their requests

By default, Exchange Server hides the addresses of public folders from the Global Address List (GAL) For this reason, before you can send an e-mail message to a public folder, you must either have the Exchange Server Administrator change the default settings to make the e-mail address of the public folder available from the GAL, or have users add the e-mail address of the public folder to their Contacts folder

Modifying Other Built-In Forms

The Outlook 2000 built-in forms (appointment, contact, distribution list, journal entry, and task) contain form-specific functionality, which you can customize

by displaying additional form pages and adding controls However, it is not always possible to modify all of the pages of a form For example, you cannot

modify the Appointment or Attendee Availability pages on the appointment

form However, the other five pages on the contact form are modifiable

Some controls, such as the Date and Time Picker selection control on the first page of a tasks form and appointment form can now be accessed by

customizing the Toolbox and selecting Microsoft Date and Time Picker Control

You should utilize the rich functionality of built-in forms whenever possible because these forms can provide valuable business functionality for very little development cost For example, assume that your solution includes a public folder that contains all the vendors used by your company If you implement this folder using a modified contact form, the functionality of the contact form,

such as New Letter to Contact and New Mail to Contact becomes part of

your application If you base the form on a post form instead, you would have

to add this functionality through script code inside the form

Trang 9

Office Document Forms

Office document forms are either e-mail messages or post forms that contain an embedded Microsoft Excel, Microsoft Word, or Microsoft PowerPoint®

document Wrapping an Outlook 2000 form around an Office document incorporates the features of the hosted document into the Outlook 2000 form These types of forms are best used when you want the replication and form library support of Outlook 2000, but you also want the functionality of other Office applications An example of an Office document form is an Expense

Report application In an Expense Report application, an Excel spreadsheet is

embedded in a post form

Trang 10

Outlook 2000 Form Components

 Compose and Read Pages

Compose and Read Pages

Each page within an Outlook 2000 form can be split into two different pages, a compose page—the page that is displayed when the item is being composed—and a read page—the page that is displayed when the item is being read The compose page and the read page can either have minor differences or have a completely different look and feel An example of this is a standard e-mail message When composing an e-mail message, you can edit the To, Cc, and Subject fields When you read an e-mail message, these fields cannot be edited, because on the read page, these controls have been set read-only The read page

of the Message tab also contains an additional field, Sent, that displays the date

and time the e-mail message was sent

Compose and read options apply to each page within a form You cannot specify individual fields within a page as compose or read If you want to use essentially the same page as both a compose and read page but want to make any changes at all to one or the other, you must create a duplicate of the first tab and then modify it To create a duplicate, create your page before separating it into a compose and read page You can also combine separated pages into one Doing so discards changes to one of the pages

Standard Controls

Controls determine how a user interacts with a form Outlook Form Designer provides a Toolbox that has 15 standard controls for custom form design You can customize the Toolbox by adding ActiveX controls and by adding more pages to the Toolbox

Slide Objective

To list the components that

enable Outlook 2000 form

development

Lead-in

Outlook 2000 supports a

number of tools and

technologies that you can

use to customize forms

Trang 11

Fields

Fields are used to store the contents of a message You view the contents of a field through controls on a form that are bound to fields within the message.You must bind the control to a form if you want to save a value to or from a control For example, within a standard mail message, the Subject field is displayed using a text box control bound to the Subject field

Outlook 2000 (and the MAPI subsystem) defines a number of commonly used fields You can create new fields for use in your own applications if an existing field does not meet your needs

Properties The Properties page contains information about the form, such as its

description and version number, and the icons used for the form when it is displayed in an Outlook 2000 view

Each control on a form page also has properties that enable you to adjust the appearance or functionality of the control To access the properties, on the

shortcut menu, right-click the control, and then click Properties or Advanced Properties

Trang 12

Introduction to the Message Class

 Built-in Forms and the Message Class

 Custom Forms and the Message Class

IPM.Contact.Customer

Form Name

Outlook item type

on which the form is based Same for all Outlook Items

The message class is an identifier used by MAPI to locate and display a form A message class is generated automatically by Outlook 2000 from the form name and is assigned to each form

MAPI separates user data and forms to reduce the network traffic required to deliver a message from one person to another Typically, only the actual data provided by the user, along with the message class of the form, is transmitted The message class is a single field that holds the name of the form that is required to display the content of the message

Built-in Forms and the Message Class

A message class starts with IPM (Interpersonal Message) and is followed by a string that identifies the Outlook 2000 item These strings form a hierarchy that defines the form

Message IPM.Note

Appointment IPM.Appointment Contact IPM.Contact Journal IPM.Activity Task IPM.Task Note IPM.StickyNote Distribution List IPM.DistList

Slide Objective

To describe the purpose of

the message class

Lead-in

Outlook 2000 decides what

form to use to view and edit

items by examining the

item’s message class

Trang 13

Custom Forms and the Message Class

Custom forms developed within the Outlook 2000 forms environment must be based on an existing form For example, if you create a custom form called Customer, based on an IPM.Contact.Nwind form, the message class is IPM.Contact.NwindCustomer

The periods in the message class are important If an Outlook 2000 client is unable to locate the form definition for IPM.Contact.Nwind.Customer then it will truncate at the right-most period and look for a form called

IPM.Contact.Nwind If it is unable to locate this form definition, it will look for

a form called IPM.Contact

Trang 14

 Building a Simple Outlook 2000 Form

 Starting the Outlook Form Designer

 Setting Form Properties

 Adding Fields to a Form

 Adding Standard Controls to a Form

 Customizing the Toolbox

 Using the Form Layout Tools

 Working with Form Pages

 Following HTML Forms Converter Design Guidelines

To build a simple Outlook 2000 form:

1 Open the item on which you want to base the form and then start the Outlook Form Designer

2 Set attributes for the form, such as a caption, password, or description on the

environment for creating

and editing forms that is

referred to as the Outlook

Form Designer

Trang 15

Starting the Outlook Form Designer

Untitled - Message (Rich Text) (Design)

Subject:

Send

Message (P.2) (P.3) (P.4) (P.5) To…

Cc…

(All Fields) (P.6)

Edit Read Page

File Edit View Insert Format Tools Actions Form Layout Help

Options

(Properties) (Actions)

Edit Compose Page

The Outlook Form Designer is a 32-bit environment development tool that is included with Outlook 2000 It is not necessary to choose any setup options to obtain it Any user who has the Outlook 2000 client installed on his or her computer can create custom forms

Starting the Outlook Form Designer

To start the Outlook Form Designer:

1 Open an Outlook 2000 item

2 On the Tools menu of the form, point to Forms, and then click Design this form

A dialog box appears, displaying several tabs with “(Design)” appended to the form name on the title bar, which indicates that the Outlook Form Designer is in design mode

The Outlook Form Designer

is the environment that you

use to customize forms

Trang 16

Setting Form Properties

Untitled - Message (Rich Text) (Design)

Always use Microsoft Word as the e-mail editor

Edit Read Page

File Edit View Insert Format Tools Actions Form Layout Help

Options

(Properties) (Actions)

Edit Compose Page

Form properties determine form characteristics, such as the category or the icons displayed with the form To configure form properties, open the form in

design mode, and then click the Properties tab The following table describes

each form property

Category Create or specify a category for the form to help organize the

forms in the New Form dialog box

Sub-Category Create or specify a sub-category for the form

Always use Microsoft Word as the e-mail editor

Specify that messages use Word editing features in the body

of the message With this option, users have access to spell checking, thesaurus, and full formatting options

Template Specify the Word template that is used to format the text in

body of the message

Contact Select the names of those people who are responsible for

maintaining and upgrading the form

Description Type a description for the form The form description appears

in the About This Form dialog box on the Help menu, and also in the Properties dialog box for the form

Version Set a version number for this form It is important to set this

and update it with each modification

Form Number Set a number for this form You can use the form number to

match forms with corresponding features in the product specification for the solution

Change Large Icon Choose an icon other than the default

Slide Objective

To show the Properties

page of the Outlook Form

Designer

Lead-in

The Properties page of the

Outlook Form Designer

enables you to set

characteristics of the form,

such as its category or

version

Trang 17

(continued)

Change Small Icon Select the small icon that will display in a table view

Protect form design Enable password protection for the form You should set this

for all custom forms that you do not want others to modify

Send form definition with item

Specify that the form definition should be included with the item This makes the form available to users who may not have access to the Organizational Forms Library

Use form only for responses

Specify that the form will be a response-only form Use this option in situations when you have created a form that is intended only for replies In another form, you can specify that your reply form will be used as the default reply form

Most of these form properties are self-explanatory Two properties, Send form definition with item and Use form only for responses, require more

explanation

Selecting the Send Form Definition with Item Option

When this form property is selected, a self-contained form is created that allows your recipients to view the form even if they do not have access to the same forms library as the sender If this property is not selected, and the user does not have access to the form from a forms library, the user will receive the default form for the message class in which the custom form is based upon instead of the one that you have created

When your form contains code, this option provides security for forms When a recipient opens the form, a Warning message appears The recipient has the option of disabling the macros if the form is not from a trusted source

Selecting this property causes the form to be much larger than if this option is not selected If network or file transfer time is an issue, an alternative to sending the form definition is to save the form and send it as an attachment to another form Recipients can take the attached form and publish it in their personal forms library

Under most circumstances, this form property should not be selected

Selecting the Use Form Only for Responses Option

This option is used in situations when you have created a form that is used only for replies In another form, you can specify that your reply form will be used instead of the default reply form The Reply Only form will not appear in a

Choose Form dialog box

To use your form only for responses, check the Use form only for responses

check box, and then publish your form Open a second form in design mode

On the Actions page of the second form, you can specify your published form

in the Reply or Reply to All action To use your form as the default reply form, double-click the Reply action in the second form You can select the name of

your published reply form in the Form name field of the Form Action Properties dialog box This will cause your reply form to be used instead of the

default reply form

Note

Trang 18

Adding Fields to a Form

Field Chooser

Frequently-used fields

New…

Attachment Categories Cc Contacts Conversation Created

Do Not AutoArchive Download State Due By Flag Status Follow Up Flag From Icon

Delete

Fields are containers that store values about an item or items The Field

Chooser is used to create fields, delete fields, or add existing fields to a form

When a form is viewed in design mode, access to the Field Chooser is provided

by default

If the Field Chooser is not visible, click Field Chooser on the Form menu to open it, or right-click the form background, and then click Field Chooser Adding Existing Fields to a Form

You can add existing fields to a form by using the Field Chooser Click the desired field, and then drag it from the Field Chooser to the form By default, the value for a field is displayed in a control that is appropriate for the type of data contained in the field For example, if you drag the To field to a message

form, a To button and an edit box are placed on the form When you click the

To button, the Select Names dialog box is displayed Once a recipient name is selected, the name appears in the Edit box

When an item is stored in a Microsoft Exchange Server mailbox, the number of characters is typically limited to 32 kilobytes (KB), whereas if the item is stored with a Personal Folders (.pst) file, the limit is typically 16 KB For example, on an Exchange Server computer, the limit would be 32 KB characters for the sum of all user-defined fields Also, the total data for the sum

of all standard fields must not exceed 32 KB

Outlook 2000 does not generate a warning when the item is saved Instead, the item will appear to save without any problems However, when the item is opened, the text will be missing and not accessible through the Outlook 2000 interface or the Outlook object model Although the data is not displayed, it has been stored within Exchange Server

Slide Objective

To show the Field Chooser

Lead-in

Outlook 2000 provides fields

to store items The Field

Chooser provides a simple

way to drag and drop built-in

and custom fields to your

form

Note

Trang 19

Adding Standard Controls to a Form

Untitled - Message (Rich Text) (Design)

Subject:

Send

Message (P.2) (P.3) (P.4) (P.5) To…

Cc…

(All Fields) (P.6)

Edit Read Page

File Edit View Insert Format Tools Actions Form Layout Help

To display the Toolbox:

• On the Form menu, click Control Toolbox

To add a control to a form:

• Drag the control from the Toolbox to the form

Dragging a control to a hidden page (a page with parenthesis around its name) will make the page visible

Saving the Value of a Control

To save the value entered into a control, you must either bind it to an existing field, to a custom field, or create a new custom field

Adding Code to a Control Event

You can add code that responds to user events by using the Outlook Script Editor

To add code to a control:

1 Start the Outlook Form Designer

2 Add a standard control to a form

3 Right-click the control and then click Properties

4 On the Display tab, type a name for the control in the Name box, and then click OK

Slide Objective

To show the Outlook Form

Designer with the Toolbox

displayed

Lead-in

The Toolbox provides an

easy way for you to pick

controls when you design

your forms

Trang 20

5 On the Form menu, click View Code This opens the Outlook Script Editor

6 In the Script Editor, type the event procedure for the control For example,

to write a procedure for the Click event for a control, type:

Trang 21

Practice: Adding Code to a Control Event

In this practice, you will create a simple event procedure for a command button control

 To create a new form

1 Open a mail message

2 On the Tools menu, point to Forms, and then click Design This Form

3 Use the Toolbox to add a new command button control to the form

 To add code to the Click event of the command button control

1 Right-click the command button control and then click Properties

2 On the Display tab, set the following properties:

Property Value

3 Click OK

4 In the form, on the Form menu, click View Code

5 In the Script Editor, type the following code:

Sub cmdClickMe_Click() MsgBox "Hello, World!"

End Sub

6 Close the Script Editor

7 On the Form menu, click Run This Form Click the Click Me button to

test it

Slide Objective

To practice adding code to

the Click event

Lead-in

In this practice, you will add

code to a control event

Trang 22

Customizing the Toolbox

 Importing or Exporting a Toolbox Page

 Adding Controls to the Toolbox

 Adding Pages to the Toolbox

 Creating a Control Group

ActiveX controls can be added to the Toolbox to provide added flexibility on forms You can purchase ActiveX controls from third-party vendors, or you can create your own by using Visual Basic

Before customizing the Toolbox, export the Toolbox settings so that if you want to return the Toolbox to its original state you can simply import the saved design

Importing or Exporting a Toolbox Page

It is a good idea to save the default state of the initial Toolbox page before customizing it Once you have set up a Toolbox page with the controls that you

want, you can export the page and make it available to other developers

To import or export a Toolbox page:

1 Display the Toolbox

2 To import a page, right-click the label of any page in the Toolbox, and then

click Import Page on the shortcut menu

3 To export a page, right-click the label of the page, and then click Export Page on the shortcut menu

4 In the File name box, type the name of the page that you want to import or

type the name of the file to which you want to export a page

Slide Objective

To list the different ways

that you can customize the

Toolbox

Lead-in

You can also add custom

controls to the Toolbox and

use the features of the

Toolbox to manage them

Tip

Trang 23

Adding Controls to the Toolbox

Before you add an ActiveX control to a form, you must add the control to the Toolbox

To add an ActiveX control to the Toolbox:

1 Right-click the Toolbox, and then click Custom Controls

The Additional Controls dialog box is displayed

2 Select the controls that you want to add, and then click OK

If you add an ActiveX control to your form, you must also provide the control (the ocx file) to the user when you distribute your application

Adding Pages to the Toolbox

If you want to add a number of controls to the Toolbox, you can add a new page

to contain them You can use the new pages to organize the controls

To add a new page to the Toolbox and rename it:

1 Right-click the Controls tab in the Toolbox, and then click New Page

2 Right-click the New Page tab, and then click Rename

3 Provide a Caption and Control Tip Text (optional), and then click OK Creating a Control Group

If you frequently use a group of controls together, you can add those controls to the Toolbox as a control group

For example, if you often create a form that has two command buttons and several text boxes in a particular layout, you can create a control group that includes these controls When you create a new form, you can use the control group to add the same set of controls in the same layout

To add a control group to the Toolbox:

1 Select a group of controls on a form

2 Drag the controls to the Toolbox

3 Right-click the control group, and then click Customize New Group to assign Tool Tip Text for the control group or to assign a new picture to

represent the group on the page

Note

Delivery Tip

If time permits, demonstrate

how to create a control

group

Trang 24

Using the Form Layout Tools

The layout commands are located on the Layout menu in the Outlook Form

Designer The following table lists and describes some of the commands on the

Layout menu

Layout menu command Used to Align Align the selected controls to the Left, Center, Right,

Top, Middle, Bottom, or To Grid

Make Same Size Make controls even heights or even widths, or even in

both height and width

Size to Fit Resize the controls to the relative size of the page, both at

design time and at run time

Size to Grid Resize the control to the nearest grid

Horizontal Spacing and Vertical Spacing

Distribute spacing evenly between objects

Center in Form Center the controls either vertically or horizontally

between the edges of the form

Arrange Arrange the controls to the right or bottom of the form

Group and Ungroup Assemble two or more objects into a group so that they

can be moved or modified together

specify Bring to Front, Send to Back, Bring Forward,

or Send Backward options for selected controls

Slide Objective

To list the form layout tools

Lead-in

You can use the form layout

tools to develop your forms

more efficiently

Trang 25

(continued)

Layout menu command Used to Show Grid and Snap to

Grid

Display the grid, which helps you align controls evenly

on a page Snap to Grid causes controls to align with the

grid automatically as they are placed on the page

AutoLayout Cause controls to position on the form automatically For

example, if a new control is dragged below an existing control, the new control is automatically aligned to the left, in the first available position on the form

Trang 26

Working with Form Pages

 Hiding or Showing Form Pages

 Creating a Completely Custom Form

Each built-in form type in Outlook 2000 contains default form pages Some of these pages contain fields and controls that make up the default functionality of the form, whereas other pages are blank, enabling you to customize the

functionality of the form While you can choose either to hide or show these pages, you cannot insert additional pages or delete pages from the form

Hiding or Showing Form Pages

Parentheses on either side of a page name indicate that the page is hidden

Almost any page can be hidden or shown, with the exception of the Properties and Actions pages, which are always hidden However, a form must have at

least one page visible at all times

To hide or show a form page:

1 While in design mode, click the page that you want to hide or show

2 On the Form menu, click Display This Page to clear or select the check

box

Alternatively, you can show a hidden page by dragging a field or control onto

it If you want to hide the page after controls have been dragged onto it, follow the procedure described in the preceding text

Creating a Completely Custom Form

All custom forms must be based on existing Outlook 2000 forms If you do not want to use the default form functionality provided by Outlook 2000, you can hide all of the default form pages and use only the extra blank pages to create a completely custom form

Slide Objective

To describe some of the

ways that you can work with

form pages

Lead-in

You can use the default

form pages to enhance the

default functionality of a

form or to create a

completely custom form

Trang 27

Following HTML Forms Converter Design Guidelines

 Naming and Saving Forms

 Using Page Guidelines

 Using Custom Actions

 Working with Graphics

 Working with Controls

After you design an Outlook 2000 form, you may want to convert it into a Web form by using the Outlook HTML Form Converter The converter handles most features of Outlook 2000 forms, but does not convert some features For that reason, you should consider several guidelines when designing Outlook 2000 forms that you might convert into Web forms By designing your forms according to the following guidelines, you can reduce the number of post-conversion steps needed to make your Hypertext Markup Language (HTML) Web forms fully functional

Naming and Saving Forms

Follow these naming and saving guidelines when designing forms that will be converted using the Outlook HTML Forms Converter

 Form description Form descriptions of any length will display correctly as

long as they do not contain carriage return characters

 Saving form definition If you want your form to have the intended message

class when viewed by using Outlook Web Access through a Web browser,

do not select the Save form definition with item check box when you

publish the form

If you do save the form definition with the item and convert it, Web browser users will see only the form that corresponds to the default message class for the item such as IPM.Note

Slide Objective

To list the categories of

common form design

mistakes that can lead to

unsuccessful conversion to

an HTML form

Lead-in

It is possible to convert

Outlook 2000 forms to Web

forms You can follow these

guidelines to ensure a

successful conversion of

Outlook 2000 forms to Web

forms

Trang 28

Using Page Guidelines

Follow these page guidelines when designing forms that will be converted using the Outlook HTML Forms Converter:

 Using “All Fields.” If you create a custom form with the Outlook 2000 All

Fields page visible, it will not be shown when viewed through Outlook Web

Access

 Width of tabs If the text of a tab (the display name for a page of a form) is

too long, you may not be able to view certain pages in your converted form

To prevent this, you can change one line for each multipage control to limit the width of the tabs For example:

i$<UniqueID>$Width = 75 'Change 75 to a higher number for wider tabs

 Do not customize the first page of a contact form Because Outlook 97 did

not support first-page customization for a Contact form, the converter does not convert a modified first page of a Contact form to HTML The converter ignores any modifications you make

Using Custom Actions

Follow these guidelines when designing forms that include custom actions and that will be converted using the Outlook HTML Forms Converter:

 Convert custom forms with custom actions While in design mode in

Outlook 2000, you can set custom actions on the Actions page You can

create a button that launches a particular form—either a standard form included with Outlook Web Access or a custom form Specify a custom form that has already been successfully converted, otherwise Outlook Web Access will return an error when it tries to start this custom form

 Number of custom actions You can use only two rows of buttons for

invoking custom actions Because the width of the button is based on the amount of text on the button, keep their titles short to allow for more buttons

Working with Graphics

Follow these guidelines when designing forms that will be converted using the Outlook HTML Forms Converter and will include graphics:

 Use image controls to set AutoSize to TRUE An image control is a control

that binds a jpg (or other type of graphic) to a graphic file Setting the

AutoSize property to True forces the control to change size based on the

size of the image and helps avoid unintended stretching of images during

form conversion You set the AutoSize property in the Advanced Properties dialog box

 Image size Images that are too big to fit in an image box in the original

Outlook 2000 form are forced (by shrinking) to fit into the resulting image box in the converted Web form

Trang 29

 Metafile (.wmf and emf) format images not supported If you create a

custom Contact form in Outlook 2000, add an image by dragging a picture box from the toolbox, and then selecting the wmf (Windows Metafile)

format image under Advanced Properties The wmf picture you selected

will not be displayed in the converted form

 Tiling of background images Background images placed on a multipage

control or a custom page are displayed as tiled in the converted form

Values set in Advanced Properties for PictureAlignment and PictureTiling are ignored

 Properties of image controls For image controls, the converter only

converts the picture bound to the image control It does not carry over background colors and most other settable properties to the destination HTML form

Working with Controls

Follow these control guidelines when designing forms that will be converted using the Outlook HTML Forms Converter:

 Align your controls on the form Because the Outlook HTML Forms

Converter uses HTML tables to position controls relative to one another, always use the layout capabilities of the Outlook 2000 design environment

to align your controls

 Avoid overlapping controls Standard HTML does not support overlapping

controls on a Web page If any controls partially overlap, the converter automatically moves one of the controls so they both fit on the HTML page

If any controls completely overlap, the converter skips converting one of the controls

 Avoid using unsupported controls If you are using unsupported controls,

you can create an instance of them as ActiveX controls on an HTML form You would then write the script to enable interaction between the ActiveX control and the Active Server Pages (ASP) application

Trang 30

 Working with Controls

 Setting Control Properties

 Setting Tab Order

 Binding Controls to Form Fields

Once you have placed controls on a form, you can further customize the form

by setting control properties and setting the order in which users can tab through the controls on the form You can also save the values that users enter into the form by binding controls to form fields

Trang 31

Setting Control Properties

Basic Control Properties Basic Control Properties

8 pt Tahoma Foreground color: Window Text Background color: Window Settings

Resize with form Sunken

Format 1 – Display date in short forma

HelpContextID 0

To modify properties for a control, right-click the control, and then click

Properties or Advanced Properties

Setting Basic Control Properties The Properties dialog box displays properties for the given field or control

The following table lists and describes the basic properties

Control properties Used to

Caption Indicate the caption that is displayed on the control

Position (in pixels) Indicate the exact position of the control on the form by using

the Top, Left, Height, and Width properties

Font and Color Select which font and color to use in the control

Foreground color Choose the color for the foreground of the control

Background color Choose the color for the background of the control

Settings Select custom and display property settings for the control,

such as the Visible, Enabled, Read only, Resize with Form, Sunken, and Multi-line properties

Setting Advanced Control Properties The Advanced Properties command displays a Properties dialog box similar

to those in Visual Basic You can use this command to set properties that are specific to individual ActiveX controls that are not found on the basic

Properties dialog box For example, the Microsoft Date and Time Picker control has a property called Format that sets the format of the dates that

appear in the calendar

Slide Objective

To show some of the basic

and advanced control

properties

Lead-in

You can set the appearance

and behavior of a control by

setting its properties

Trang 32

Setting Tab Order

Tab Order

Tab Order

OK Cancel

txtTo

txtCC lblSubject txtMessage cmdToButton cmdCCButton

Move Up Move Down

As you add controls to a form, the tab order of the controls (or the order in which users tab through the controls on the form) is set to the order in which the controls are added to the form Generally, users will expect to tab through the controls in order from left to right and from top to bottom If you do not add the controls to the form in the exact order that users would expect to use them, your form will be confusing and unpredictable to use It is important to follow a naming convention when creating controls on a form The importance of following a naming convention can be seen when attempting to determine to what each item in the list refers For example, without a naming convention, the list would read, CommandButton1, CommandButton2, Textbox1, Textbox2, and so on

Setting the Tab Order

To set the tab order for a form:

1 On the Layout menu, click Tab Order

2 Use the Move Up and Move Down buttons to change the tab order of the

controls and fields on the form

Slide Objective

To show the Tab Order

dialog box

Lead-in

Setting the tab order of

controls on a form will help

to create a predictable

experience for those who

use the form

Trang 33

Binding Controls to Form Fields

Choose Field To

Format: Text Property to use:

to a field, Outlook 2000 does not store the data in the Exchange Server database

Outlook 2000 fields are based on MAPI properties In this way, the values of fields are stored with the item when you save or send the item Fields can be used on any form If you change a field value in one place, this value changes everywhere the field is used

Using the Field Chooser to Bind Controls to Fields

When you drag a field from the Field Chooser, the field automatically binds to the appropriate control

Slide Objective

To show how to bind a

control to a field

Lead-in

To save a control value, it

must be bound to a field

Trang 34

Manually Binding Controls to Fields

When you drag a control from the Toolbox on a form, you must bind the control to a field if you want to save a value to or from the control In most cases, you bind TextBox, CheckBox, ListBox, ComboBox, and OptionButton controls to fields Label controls can be used on a Read page to display information but the user cannot change this information Sometimes, when you create a new control, you will want to bind the control to an existing field rather than create a new one

To manually bind a control to a field:

1 Right-click the control, and then click Properties on the shortcut menu

2 Click the Value tab

3 Click Choose Field

4 From the drop-down list, choose the field you want to bind to your control

or click New to create a custom field

Trang 35

 Working with Fields

 Storing a Field Definition

 Creating a Custom Field

 Creating a Formula Field

 Creating a Combination Field

 Restricting Field Access

 Setting the Initial Value of a Field

 Requiring and Validating Information in Fields

While the existing fields are appropriate for most situations, you may find that you need to create a custom field to store your data For example, if you are creating an expense report application you can provide a field for the account code There are several types of custom fields: simple custom fields, which include a single data type; formula fields, which hold the results of formulas you create; and combination fields, which allow you to combine values from other fields with literal strings to create new fields

In addition to creating custom fields to store more complex data types, you can also use them to perform more advanced customization of your form

Slide Objective

To outline this topic

Lead-in

Custom fields enable you to

store data that is specific to

your solution

Trang 36

Storing a Field Definition

 Custom Field Definitions Are Stored In

When you create a new custom field for your application, it is stored in the current folder For example, if you are creating a form while the Inbox is selected, and you create a new field, the field is stored in the Inbox, not the item Until a value is entered in the field for the item, the field does not really exist in the item MAPI holds within the item only the fields that contain some data There are hundreds of MAPI and Exchange Server fields but an item will only hold those it actually uses

Once a field has been created only its format or formula can be changed To change the type or name of the field, the field must be recreated

You would normally use a field stored in an item A field stored in a view is only necessary if you want to be able to add the same piece of information to many items in the view especially when the items are based on different forms

Adding a field stored only in the folder to a view and using in-cell editing to add data to that field to a form that does not contain that field causes the design of the form to change Changing the design of a form without publishing it one-offs the form One-off forms are forms that save the form definition within the item rather than in a forms library

Slide Objective

To describe the different

ways that field definitions

are stored

Lead-in

You can store a field

definition in either a view or

a form

Important

Trang 37

Creating a Custom Field

Do Not AutoArchive Download State Due By Follow Up Flag Junk E-Mail Type Message Read Sensitivity Sent

OK Cancel

Move Up Move Down

New Field

Name: %Complete Type: Percent Format: All digits: 65.4321%

Creating a Simple Custom Field

To create a simple field for a form:

1 In design mode, click the All Fields tab

2 Click New Field

3 In the Name box, enter a name for the field

4 In the Type box, click the data type you want for the field For the purpose

of this exercise, do not select Combination or Formula

5 In the Format box, select the format you want for the field, and then click

OK

Removing a Simple Custom Field from a View

To remove a simple custom field from a view:

• Highlight the view and then click Remove

Slide Objective

To show how to create a

simple custom field

Lead-in

Single data types are the

simplest custom fields

Trang 38

Creating a Formula Field

Field Properties

Name: %Complete Type: Percent Formula: [Sales Value]+[TAX] Edit…

A formula field shows the results of calculations on standard fields or custom fields

Using Outlook 2000 Functions

You can build complex formula fields by using the functions provided by Outlook 2000 The following table lists and describes the various Outlook 2000 functions

Function Description

Conversion Convert one value to another value For example, you can use the

Ccur function to convert a number to the Currency data type

Date and Time Use to extract information from a date and time field For example,

you can pass a date and time field to the Weekday function to return

an integer that represents the day of the week

Financial Use to calculate loan information, such as the payment amount, the

present value, and so on

General Types include the Choose, IIf, and Switch functions

Math Use to perform mathematical computations, such as the absolute

value of a number

Text Use to manipulate string values For example, you can use the Mid

function to extract certain characters from any portion of a string

Slide Objective

To show how to create a

formula field

Lead-in

A formula field holds the

results of formulas you have

created

Trang 39

Combining and Extending Outlook 2000 Functions

The following table lists and describes the operators that can be used to combine and extend the functions included with Outlook 2000

Operator Description

Arithmetic Use to perform a mathematical operation on two expressions Comparison Use to compare expressions For example, use the <> (not equal to)

operator to compare two strings of information

Concatenation Use the concatenation operator (&) to join two strings together Logical Use to perform a logical operation on expressions The more

commonly used logical operators include And, Not, and Or

You cannot sort or group a view based on formula fields

Defining a Formula Field

The following example defines a formula field called TotalSaleValue that multiplies two user-defined fields, UnitCost and NumberSold, by using the following multiplication operator

[UNITCOST] * [NUMBERSOLD]

Using the Format Function

The following example applies a currency format to the result of the formula by using the Format function:

FORMAT([UNITCOST] * [NUMBERSOLD],"$0.00")

Using an If Statement

The following example uses an If statement to compare the Modified date/time

on a message with the Received date/time on a message If the two dates are different, then the Field contains “MODIFIED.” If the two dates are the same, then the field contains “NOT MODIFIED.”

IIf([Received]<>[Modified],"MODIFIED","NOT MODIFIED")

Note

Delivery Tip

If Time permits,

demonstrate the use of a

formula field using

\Demo\Module03

\Formula.oft

Trang 40

Creating a Formula Field

To create a formula field for a form:

1 In design mode, click the All Fields tab

2 Click New Field

3 In the Name box, enter a name for the field

4 In the Type box, click Formula

5 Click Edit

6 To insert a function in the formula, click Function, point to the function that

you want, and then click the formula that you want

7 To insert a field in the formula, select the argument that you want to replace,

click Field, point to the field set that you want, and then click the field that

you want

8 Click OK twice

Ngày đăng: 04/11/2013, 13:15

TỪ KHÓA LIÊN QUAN