Advertisment

Custom Forms with Outlook and Exchange

author-image
PCQ Bureau
New Update

Every time you use MS Outlook for any function–creating a new e-mail, replying to another, creating a contact, task, note or appointment–you are using built-in forms that let you do these. These forms let you interact with Outlook as well as other members of your organization.

Advertisment

However, did you know that you can create your own set of forms and use them for collecting data and interacting with other users in a much more efficient way? Custom forms are a powerful way of collaborating with other members of your organization. In this article, we’ll take a look at how to create and use simple forms and share them with your colleagues.

The first place where you can see the power of custom forms is without requiring you to create anything. Instead, compose a new e-mail message addressed to some people in your organization. In the mail window, click on the “Options…” button at the top. In the options dialog box that opens, turn on the “Use Voting Buttons” option and select the type of button set you want–“Approve/Reject”, “Yes/No” or “Yes/No/Maybe.” Click Ok and send the message.

When a user opens this message in his Outlook, he will get the chosen voting buttons on the top of the message automatically.

Advertisment

He can simply click on his choice of reply and a mal will be sent back to you. No only that, Outlook tallies the replies according to the votes each option got and shows you the running total as you get replies from each person you sent the mail to. Think about doing this using normal e-mail. You’d have to sit and enter the vote count yourself as and when you get a reply. This is a simple example of a custom form in action. So let’s move on to creating a custom form yourself.



Creating an Outlook Custom Form

Type Name Caption Field Values
Label Label1 Date of Birth -  
Label Label2 Marital Status -  
Label Label3 Sex -  
TextBox txtDoB - DateOfBirth -
Combobox cmbMarital - MaritalStatus Single;

Divorced; Married; Widow; Widower


OptionButton opSex Male Sex Male
OptionButton opSex Female Sex Female

Why would you create a custom Outlook? The reason is simple. Say you wish to collect some data from a number of users in your organization. If you are not using an Outlook form, you’d e-mail each of them and tell them that you need such-and-such information. They’d then reply to you with the information, but in different formats. For example, say you wanted to know the date of birth, marital status and gender of all members in your organization or department. You could send an email to everyone. When replying, in a single field, say “Sex”, you’d get a variation in the values you receive–such as “Male”, “Female”, “M”, “F”, “Man”, “Woman” and so on. The date format could be even worse! And this is just a simple example.

Advertisment

However if you were using an Outlook form, the user would just need to reply to your message using the normal Windows control-based message. What does this mean? For an date field, the user would be presented with a date picker drop down, for the gender–a drop down with “Male” and “Female” already entered and a set of radio buttons for the marital status. So that when you receive the data back from each user the data is in a consistent format.

So, let us now go ahead and create this very survey form in Outlook. The instructions here are for Outlook XP (2002) but are very similar for Outlook 2000 as well. First of all, go to one of the main folders of your Outlook. Open the ToolsàFormsàDesign a Form menu option. This brings up a dialog box that asks you to choose a form from the “Standard Forms Library”. These standard forms are the ones that are used in Outlook for each task that you can do. For this example, select the “Message” template and click Open.

Name Type Format
DateOfBirth Date/Time Monthname

Day, Year as in July 10, 2002
Sex Text Text
MaritalStatus Text Text
Advertisment

You now get a form designer page with a new toolbar as well as the main message area. You also get a series of tabs, labeled (P.2), (P.3) etc and a couple of them more. The first tab–Message, is the one that is used in the standard message form. In most cases you’d want to leave it as it is. However, in this case, we’ll make a small change to this page. Right click the text field in the “Subject” Line and select Properties. Now in the dialog that appears, turn off the Enabled option and go to the Vale tab. In this turn the “Set initial value…” check box on and enter “Departmental Survey” into the text box below it. Click Ok to continue.

Click on the (P.2) tab now. Select Form>Display this Page and Form>Rename Page. Give the form a descriptive text, such as “Enter Survey Answers Here”. Now make sure the Field Chooser and the Control Toolbox windows are visible by selecting them from the Form menu or using the toolbar buttons.

Go to the Field Chooser window and select “User defined fields” in the drop down. Now click “New” and create three fields as given in Table 1.

Advertisment

Now, use the Control Tool Box and create the following controls. You can right click a control and choose properties to set its other values as shown in table 2.

You can even change the attributes of the form a bit and make it look different and more aesthetic if you wish. Now comes the time where you can save this form for usage. For this, you need to select Tools>Forms>Publish Form and enter a name for the form. This form will be published into your Personal Forms Library by default. For this form you could enter a name like “Survey”. Make sure you select “Yes” when prompted to save the definition along with the form. This allows Internet based users to be able to use this form if they receive it in Outlook as well.

Remember that this is the form that people you send a message to reply with! Not your message to them. So how do they get this form in the first place? For this you need to create another custom form. Follow the same procedure of designing a new form as mentioned earlier. But instead of modifying or adding any new fields on a new page, simply go to the (Actions) tab. In this, double-click the row with Action Name as “Reply”. In the dialog box that open up, select “Forms…” in the Form Name option and then browse to your personal forms library. Select the survey form that you just created. You can change some other attributes such as whether you wish the original message to be included or not and whether the reply is sent immediately.

Advertisment

Another thing you can do here is to enable or disable the Reply to All and Forward actions as you want the recipient to be able to reply only to you.

Publish this form too as “Survey Request”. Now, go to your Inbox and select File>New>Choose Form. Select the newly created Survey Request form (not the Survey form) and enter the names of a few recipients you can send this to. Simply send the message as you normally would. Since you are testing the forms, we recommend sending it to yourself first.

When a recipient, in this case, you, receive the message, after you’ve read it you can reply to it. As soon as you do, the survey form is automatically installed on your machine and the modified form with the additional tab appears instead of the standard one! The user can fill in the values and press Send to reply. When the sender, again you, receive the reply, you can open the mail and go to the tab to see the choices the user has made.

Advertisment

Currently the survey and survey request forms will work among Outlook users even without having an Exchange Server in between. However what happens when you wish to create or use organization wide forms. For example, a leave request, travel expenses, or inventory indent request. This is where an Exchange infrastructure comes in.

Using Outlook Forms with Exchange



So far you’ve only put the form in the Personal Forms Library. This allows only you to use the forms you created. However in case you wish others to be able to use the forms as well, you need to publish the forms to Public Folders on the Exchange

Server.



But first, you must give rights to those people in the organization that can create and publish forms to Exchange. For this open up the Exchange administration MMC, and go the Public Folders root. Right-click this and select View System Folders. You will now see a large set of system public folders become visible. The first one–EFORMS, is the one you need to use. Right click this and choose New Organizational Forms Library. You can now create libraries of forms within this. Go to the properties of the library and set the permissions for the people who can publish forms to it.

You

can create a new form in Outlook to automate tasks

Now within Outlook, instead of selecting the Personal Forms Library, use the Organizational Forms Library to publish your form. Once published, anyone in the organization can use this form. You can also publish the form to any public folder in case you wish that only the form is used to post into that folder.

Collating results



Till now we’ve only taken a look at creating and using simple forms. But how about collating the results or storing the responses into a different format, say into a spreadsheet or database? What about getting the data within a form from a database?

These require Outlook and Exchange programming to work. There are many different ways you can do this but involves a thorough understanding of how these two programs work and interact.

We shall take a look at building some simple Outlook forms for Exchange and database interaction next month.

Vinod Unny, is a Technology consultant at Enterprise InfoTech

Advertisment