The magazine of the Melbourne PC User Group
Microsoft Outlook Forms
A Guide to Designing and Building Custom Forms
Russell Richardson |
|
Most of us who use Microsoft Outlook are aware of its primary capabilities.
We can send and receive e-mail. We can keep a calendar, use its journal facilities, schedule tasks and create
and maintain a raft of folders. Those who are on an exchange network can also share public folders and use
the exchange facilities of inbox assistant and out of office assistant to automate some processes. When
combined with our daily browse through the internet, our e-mail message handling, and, our necessary job
functions there really isn't much time left to discover what else it can do.
One of the more interesting capabilities of Microsoft Outlook is the facility to modify the existing forms
templates (message, note, journal, task, contact, post and appointment) in order to design new custom forms
for our own use.
You might ask, why would you want to create your own form? Well, there could be any number of reasons why
you might want to design your own form.
The simple addition of a special graphic to customise your view of your e-mail messages may satisfy a need
to personalise your messages. This graphic may or may not be sent to the recipient depending on how you
design and publish the form, but it can make your view look so much better.
More sophisticated forms can be created to provide an application platform within Outlook. The use of Outlook
forms within an exchange environment can help control the flow of work or keep track of various resources
within an office.
Imagine a personal assistant who needs to keep track of the whereabouts of several key staff. If a custom
form was designed that the staff could use to inform the personal assistant of their movements into and out
of the office, it would make it much easier to keep track of their locations. This form could have the
address of the personal assistant coded into the address field so that it becomes much simpler and quicker to
fill-in and send. Many verbal notifications are missed due to interruptions and confusion. Leaving notes is
time consuming and again prone to confusion. However, clicking a few buttons on an outlook form just before
leaving the desk or just after returning will be more secure and reliable and most importantly,
easier. It will also give an accurate reflection of the time taken for specific out of office
functions.
This capability of generating custom forms has been available within Outlook for some time now and its
functionality increased greatly when Microsoft incorporated a VBA Macro capability into the Office 2000
release. Using the forms capabilities with the enhanced HTML functionality of Outlook can provide an
application solution that works well in conjunction with the immediate availability of the other Outlook
functions such as the calendar and task and contact items.
Developers should keep in mind that both the senders and recipients must be using Microsoft Outlook.
Even if the sender and recipient have Outlook, their mail services connectors and gateways must support
attachments in rich text format.
Example Of a Useful Form
If you want to create a new form within Microsoft Outlook, you must start with an already existing form
template. As a result, you need to think through just what you want this new form to be able to do before you
choose the appropriate template. For the purposes of this article we will use the default message template.
We want to build a simple message form that can be sent to a specified address and most importantly, be sent
with a minimum of effort. It will allow the sender to notify the recipient when they leave their desk and
when they return.
To begin customising a new message form, you must open the default message form. This is the form used to
send e-mails. The easiest way to do this is to select to open a new message. When the form has appeared, fill
in the address field with the address of the recipient and make a simple subject message.
We are now ready to redesign this form. In Outlook 97 the menu option is Tools|Design Outlook Form. In later versions of
outlook there are slightly different menu commands to put the form into design mode for example in Outlook
2000 the menu options are Tools|Forms|Design this form.
Our users will not need to see the address, cc, subject or message fields so we will select these fields and
their associated labels or control buttons and change their visible properties to false. To do this,
you can select the field by right clicking it. You can then view its properties by clicking properties from
the list that appears. When the properties form has focus, click the visible checkbox so that the check mark
disappears, then click OK.
These fields should not be deleted from the form, but in order to make designing our own form easier we need
to make them as unobtrusive as possible by reducing their size and moving them out of the way. Manipulating
controls is a separate subject but suffice it to say you can move them about and reduce their size quite
simply by using the mouse.
A separate read page is useful if you want the recipient to
have a different view of the information, or, you want the recipient to have additional functionality such as
control buttons that the sender doesn't need. Since this form will not require a response, we will not need a
separate read layout.
So we turn this option off by clicking Forms|Separate
Read Layout toggle. This will discard any changes to the read page and
turn off the Edit Compose Page and Edit Read Page speed bar items. Figure 1 is a view of our form to this stage. Note the various standard messages
fields placed out of the way on the right hand side of the form.
|

Figure 1. First stages of development.
|
Our form will not need the options tab, so, click on the options tab. This
brings the options tab form to the foreground. Click
Form|Display This Page toggle to turn off its display capabilities.
The options tab's caption will be embraced in parenthesis (round brackets) to indicate it will not be
available
Switch back to the message tab to begin putting our own controls on the form. We want to have a very simple
display that gives information to indicate the movements of the sender.
To add controls, you need to get those controls from the toolbox. Make the toolbox visible by clicking the
menu item for control toolbox or clicking the speedbar item. The location for the toolbox menu item may vary,
depending upon your version of Outlook.
Place a label on the form by clicking the label button
on the toolbox then positioning the label where it is to reside on the form and clicking the form. To change
the caption, right click on the label and select the properties option from the list that appears.
Change the caption and make the font larger to reflect that this is a heading then press OK. Figure 2 is a
view of the form with label placed in position and the properties form displayed.
Place an edit control to the right of the label. This will be used to hold the current date and time.
Right click the control, select the properties option from the list, click the value tab and then
click the new button to define a new field which will hold this date/time information.
|

Figure 2. Label in position and properties displayed.
|
|
Give the new field a name (any name of your own choosing) then select type
Date/Time and accept the default format. Press OK
When the properties form regains focus, type NOW in the "initial value
field" making sure that the "set initial value" check box is ticked. Figure 3 is a view of the form with the
edit field placed in position and the properties form visible and filled in.
Now place a combo box on the form under the label. This combo box will contain a list of activities
that can normally be expected to cause the worker to leave or return to their desk.
|

Figure 3. Edit field in position and modifying properties.
|
Activities such as "Meetings", "Sales Call", "Interview",
"Lunch" are standard activities that happen quite regularly.
Right click on the combo box and create a new field to hold the value stored when the user selects (or
enters) an item in the combo box. After creating the new field, enter default values in the property field
"possible values". Separate each list item with a semi colon. In this example, we set the initial value to
"Returned to Desk" (Figure 4)
We could enhance the form's appearance with some graphics but our intent was to keep this form simple and
easy to use while performing the function required. The controls we have placed will allow the sender to pick
from several options in the combo box or enter a more specific activity. |

Figure 4. Setting the initial value.
|
The system enters the date/time and the address information has been
embedded in the appropriate fields. The sender need only call up the form, click the appropriate combo box
entry and press Send.
The recipient need only browse their Inbox to find the latest
received message from the sender. Opening the message reveals where the sender is located at any particular
time.
Figure 5 is our finished form. With extra effort the form could be visually enhanced, but for our purposes we
are finished.
Saving/Publishing
Now we have to save this form so that it can be reused. Theoretically we should have been saving the form at
each step of our development. But, for new users, the saving and publishing of forms is a bit confusing and I
have left this until now, focussing firstly on the basic mechanics of creating a form.
|

Figure 5. The finished Form.
|
Considerations for Saving and Publishing Forms.
Save to Outlook Folder
At any time during the form design, pressing file/save will save that form in an Outlook folder. Outlook 97
uses the Inbox. Subsequent versions save the form in the user configured default "save to" location. Most
post Outlook 97 setups I have seen use the Drafts folder. Keep in mind that each save creates a new
entry in the folder so you could wind up with a lot of copies of the form by the time you have finished. To
open a saved form just double click it. Once it is opened you can continue designing the form by switching to
the design mode.
Save to Outlook Form Template
You can also save the form as an Outlook Form Template (.oft) file by clicking File|Save As and specifying a path and filename.
It is strongly suggested that any .oft files saved should be saved in the folder with the already existing
Outlook templates. In Outlook 97 this is c:\program
files\microsoft office\templates\outlook but it may differ on latter
versions. To open a form saved as a .oft you must use the menu commands available in your particular outlook
version. Menu Files|New|Choose Template. In Outlook 97, it appears that this function only accesses templates stored in the
default outlook template location. To browse for a stored custom form, use the menu option
Tools|Find Items. From there
select Look For :Files and click browse.
Publishing a Form
When you publish a form, you are saving it in a forms library. Publishing the form makes it easier to
access that form on a regular basis in Outlook. There are three types of forms libraries. The personal forms
library, the folder forms library and the organisational forms library.
The personal form's library is unique to the user and is stored in the user's mailbox. Only that user can
use forms stored in their personal form's library.
The organisational forms library is stored on the exchange server. Forms published in the organisational
folder are accessible by all users within the organisation.
The folder forms library can be unique to the user (Private Folder) or it can be available to all (Public
Folder). Forms published in a folder are accessible to the user when that folder is open.
Using a Published Form
To use a form published in the personal forms library or the organisational forms library use the menu
item File|New|Choose Form and then select the form from the appropriate library.
To use a form published in a folder, open the folder by clicking on its icon. When you click the menu item
Compose in Outlook 97, the list of forms published in the folder that is open will be displayed so that new
forms can be opened with a single click. Alternatively, you can select File|New|Choose Form and select the required
form in a similar fashion to selecting from personal forms libraries. In Outlook 2000 it is the action menu
item that lists forms published in an open folder.
Back to our simple example. We want our user to be able to send this form with a minimum of effort. We also
want to distribute the developed form as efficiently as possible. In this case, we would more than likely
publish this form in the organisational forms folder. With the advent of macro capabilities in Outlook 2000,
it is possible to generate a macro which can be controlled by a speedbar item. This will automatically bring
up the form with a single mouse click, thus making the form even easier to use.
It is obvious that you can't cover the entire scope of the subject in a small article, but I hope this brief
introduction will help readers understand the concept of custom Outlook forms, their functionality and
design.
A word of caution. You can publish the same form to all three locations. This can cause
difficulty while you are developing the forms because Outlook has a default routine for choosing published
forms of the same name.
If you change and republish forms, you must republish them in all libraries where they are currently
published in order to avoid confusion.
Reprinted from the November 2001 issue of PC Update, the
magazine of Melbourne PC User Group, Australia
|