Tag Archives: Custom form

Why using Custom Outlook forms and HTTP scenarios not recommended?


In Outlook, custom Outlook forms are not supported for use with HTTP-based mail services (such as Microsoft Hotmail). Outlook does not prevent you from using custom form features if you are using an HTTP-based mail service. However, some features do not work correctly. The features do not work correctly because HTTP-based mail messages are stored in a read-only state on the server. Therefore, we recommend that you do not use custom Outlook forms if you are using an HTTP-based mail service.

Outlook Custom form : Creating a message class when customizing form pages


In the Publish Form As dialog box, when you type a name in the Display name field, you will notice that the Form name field reflects the display name by default. You can leave the form name to be the same as the display name or you can change the form name. The display name will be the caption at the top of your form. The display name will also be used to construct the name under which your form will be published. When you publish your form, the display name will be listed in the Choose Form dialog box.

Outlook automatically constructs a message class for the form by preceding the form name with IPM. For instance, if you publish a mail message form that you want to name "MyForm", in the Display name field, type: This is my Form. In the Form name field, type: MyForm. At the bottom of the dialog box, Outlook will display the message class for your new form as: IPM.Note.MyForm.

When you search in the Choose Form dialog box, you will see "This is my Form" displayed in the list. If you select it, the Display name field at the bottom of the dialog box will display, "This is my Form" and the Form name field will display, "MyForm".

A message class, which is generated automatically by Outlook from the form name, is assigned to the form. When a form with that message class is selected, Outlook loads and displays an instance of that form. Outlook will use the message class, IPM.Note.MyForm, to locate the form with the display name, "This is my Form".

Please note:

  • The message class is an internal identifier used by Microsoft Office Outlook and Microsoft Exchange to locate and activate a form .
  • The message class property corresponds to the MAPI property PR_MESSAGE_CLASS.
  • This class property determines which receiving folder the message should be routed to and which form should be activated to view the message.

Custom forms deployment : Where we can publish Outlook Custom forms?


In Outlook, custom forms are typically published to a forms library so that only one copy of a form is stored on your computer. Individual items contain a Message Class field that indicates which form to use to display the data that is contained in the item. When you publish custom forms to a forms library, Microsoft Exchange Server-based computers and Outlook use considerably less resources and bandwidth because the form itself does not need to be stored within each individual item.

Considerations When You Are Deciding Where to Publish a Form:

There are many questions to take into account when you are deciding where to publish a form:

  • Is the form based on a folder solution, or is it an e-mail message form that is designed to be sent to recipients?
  • Are you using an Exchange Server-based computer? If you are using an Exchange Server-based computer, is it possible to publish the form to the Organizational Forms Library, or has your organization placed restrictions on what types of forms can be stored there?
  • How many people need access to the form?
  • Will the form be updated often, making it important to have only one copy of the form deployed centrally?
  • Does the form need to be available offline?
  • If this is an e-mail message form, will it be used only inside the organization, or will it be sent to other recipients outside of the organization?
  • How will the new form be opened?

Where we can publish?

Now we can see where we can publish these custom forms.

Outlook forms solutions can vary greatly, especially because Outlook has a number of different types of standard forms. It is often difficult to determine the best place to publish a form, and there are many factors to take into account when you make the decision. Forms can be published to three locations:
(1) A folder (or Folder Forms Library)
(2) Organizational Forms Library
(3) Personal Forms Library

We’ll discuss them in detail and how these three makes differences:

(1) A folder (or Folder Forms Library):

  • For most folder-based forms solutions, publish the form to the folder so that it is available whenever someone is using the folder.
  • If you publish the form in a public folder, the form is available to everyone who can access the folder.
  • If you publish the form to one of your personal folders, it is available only to you when you are using that folder.
  • Contact, Post, Task, and Journal forms are examples of the types of forms that are typically associated with a folder.
  • One advantage to publishing a form to a folder is that the form is available on the Actions menu when you are in the folder.

(2) Organizational Forms Library:

  • Publish the form to this library if you want to make the form available to everyone in your organization, such as a form to report vacation time.
  • This library is often used for e-mail message forms because they are typically not based on a specific folder.
  • You can publish a form to the Organizational Forms Library when you want to use the same custom form in more than one folder.
  • When you do this, you can maintain only a single published form.
  • Forms that are published to this library are accessible to everyone in the organization as long as they are given permissions to the library by the administrator.
  • The library is stored on the Microsoft Exchange Server-based computer.
  • The administrator must give you permissions to publish to the Organizational Forms Library.
  • This permission is typically given to only a few individuals or a department that manages the Exchange Server-based computer.

(3) Personal Forms Library:

  • Forms that are saved in this library are only accessible to you.
  • When you publish a form to the Personal Forms Library, the form is stored as a hidden item in the root folder of your mailbox or Personal Folders (.pst) file, whichever is your default mail delivery location.
  • Like forms that are stored in the Organizational Forms Library, these forms can be opened by using the Choose Form command.
  • Save a form to this library when you create a form for your own personal use, such as a standard e-mail message form that is pre-addressed to recipients.

Please note: It is also possible to store an Outlook form as a file in the file system or as an item in an Outlook folder. Microsoft recommends that you to avoid these approaches, because the form will be a one-off form.

image

Deciding Where to Publish Folder-based Forms:
  • When you create a folder-based solution where the primary focus of the form is to display the items in a single folder, typically publish the form to the folder itself.
  • When you publish the form to the folder, the folder is a self-contained entity and the form is available on the Actions menu.
  • However, there are scenarios where you may not want to publish a typical folder-based form to a folder.
  • If you use a form in more than one folder, and each folder always uses the same version of the form, consider publishing the form into either the Organizational Forms Library or the Personal Forms Library. When you do this, there is only one copy of the published form and it is easier to update if you need to make changes.
  • If you are the only person who needs access to this form, publish the form in Personal Forms Library.
  • If other people need to access to the form, and the form is typical in a public folder on an Exchange Server-based computer, investigate whether or not you may be able to publish the form to the Organizational Forms Library.
  • Note: One potential disadvantage to this approach is that the form will not be available under the Actions menu unless it is published to the folder. However, if it is the default form for the folder, as is typically the case, this will not make too much of a difference because you or the users can use a toolbar button to open new items.
Deciding Where to Publish Message-based Forms
  • If the form is based on an e-mail message and it is used by you and only a couple of other users, publish the form to the Personal Forms Library for all of the users. However, if you are going to create new items based on this form, you may want to publish it to your Inbox so that you can access it on the Actions menu.
  • If the form is going to be used by many people within an organization, publish it in the Organizational Forms Library so that there is only one copy of the form to maintain and all of the users have access to it. This approach, however, can make the form more difficult to open.

Behavior changes in Outlook : MAPI & Custom properties


Per the knowledgebase the implementation of MAPI in Outlook has been changed to control how custom properties can be created. To guarantee consistent use of custom properties, custom properties must already be used in the organization or on the Outlook client. As soon as custom properties are being used or are registered, the custom properties can be freely transmitted to other Outlook clients or to servers that are running Exchange Server. The custom properties can also be sent over the Internet.

E-mail messages are typically sent in MIME format over the Internet. When Outlook receives an Internet e-mail message, the message is converted into a MAPI representation. The following are examples of Internet e-mail protocols:

  • POP
  • IMAP
  • HTTP (Hotmail)

By default, Outlook no longer enables Internet mail to create new custom properties. Only properties that are already created in the default mail delivery store are preserved for incoming e-mail messages.

This change mostly affects messages that are sent in encapsulated TNEF (Winmail.dat), where the sender has used the Send using Outlook Rich Text Format option. However, Internet messages that contain X-message header properties are also affected.
Note Messages that contain custom properties that are sent in an Exchange organization are not affected by these changes.

Custom properties can also be saved in .msg files and in .oft files. If a user opens a .msg file that has custom properties, those custom properties are not saved to the default store when the message is saved, forwarded, and so on. Typically, .oft files are used to back up Outlook custom forms. With .oft files, the new behavior applies to all kinds of items. The custom form will not open. Instead, the message will appear in the default form for that particular item type.

In summary, this change in design can cause two things to occur:

  • Outlook ignores non-existing custom properties. If a custom property does not exist in the delivery store, the property will not be created, and its value will be lost. If the custom property already exists in the delivery store, its value is persisted. This change applies to the following:
    • Internet e-mail messages that have TNEF and their embedded messages.
    • S/MIME messages.
    • .msg files when you drop the .msg file into an Outlook item window to add the file to another item. This change also applies to .msg files when you drop the .msg file into the main Outlook window to add the file to a folder or in the Microsoft Word window when you use Word as the e-mail editor.
    • .msg files that a user double-clicks or right-clicks to open.
  • Outlook ignores the one-off form definition. If a one-off form specifies a custom property and that custom property does not exist in the delivery store, the one-off form is not rendered. Instead, the user will see the default form for that particular item type. This change applies to Internet e-mail messages that contain a one-off form definition that is encapsulated in TNEF. This change also applies to .oft files that a user double-clicks or right-clicks to open.

Outlook Programming: Custom forms & disabling the macro warning?


This issue happens if the form is not located in a trusted location, such as the Organizational Forms Library on an Exchange Server-based computer. Outlook displays the macro warning message to protect you from potentially malicious programming code, commonly called macro viruses.

  • You cannot directly prevent the warning message from appearing;
  • you must publish the form to a trusted location.

In detail, outlook always prompts you before opening an item that contains VBScript code if the item is from an unknown source. This methodology ensures that unsafe VBScript code cannot run on your computer without your explicit approval. Outlook bases the decision to display or not display a warning on the item’s form design and where script, and the accompanying form definition, is actually stored.

  • If the form has been published in one of the forms libraries (organizational, personal, or folder), Outlook considers the form safe, and no warning appears. The author of the form had the appropriate privileges to publish the form, so the form is considered trusted.
  • If the VBScript code and form definition is carried within the item, Outlook considers the form unsafe, and the user receives a warning when opening the item

Ideally, when you design a forms solution, you should avoid having the VBScript warning message appear. Additionally, you do not want the custom code to be automatically disabled. If you are using a custom mail message form and you are also using Outlook in a Microsoft Exchange Server environment, ideally you should publish the form into the Organizational Forms Library so that it is available to all users within the organization. In addition to not having the warning appear, another benefit is that the form definition is not routed from user to user, which can save considerable network and server resources.

If you are using a "non-routed" form, such as a contact or post form, the form should typically be published into the folder which will store the items that are based on the form. For example, if you are creating a custom contact form that will be used to store shared contacts in an Exchange public folder, the form should be published in that public folder. One exception to this general rule is if you will be using the same custom form in many folders. In this case it may be advisable to publish the form to the Organizational Forms Library so there is only copy of the form to maintain.

Known Issues : To be considered during creating Outlook related applications


  • Development : Outlook Object Model & Outlook 2007

There are couple of known issues that may occur when you use the Microsoft Office Outlook 2007 object model. Please find the below given article, which talks about this.

Known issues that may occur when you use the Outlook 2007 object model
http://support.microsoft.com/default.aspx?scid=kb;EN-US;929593

  • Development : Form regions & Outlook 2007

There are couple of known issues that may occur when you use the Form regions and Outlook 2007. Please find the below given article, which talks about this.

Known issues with developing Office Outlook 2007 form regions
http://support.microsoft.com/default.aspx?scid=kb;EN-US;929592

  • Development : Custom forms & Outlook 2007, Outlook 2003, Outlook 2002, Outlook 98 and 97

There are couple of known issues that may occur when you use the custom forms that were created by using the following earlier versions of Microsoft Outlook. Please find the below given article, which talks about this.

Known issues in Office Outlook 2007 when you use custom forms that were created by using earlier versions of Outlook
http://support.microsoft.com/default.aspx?scid=kb;EN-US;929591

Note: The scope of this article is limited to custom forms that you create by using the method with which you would typically publish a form in these earlier versions of Outlook. This article does not discuss custom forms that you create by using the new form region feature in Office Outlook 2007.

  • Development : Custom solution & Outlook 2007

There are some of the known issues with the Outlook 2007 development platform. These issues include changes to command locations and changes to how Outlook displays COM add-ins. Additionally, this article discusses functionality changes in Outlook 2007. Please find the below given article, which are mentioned in this article are not directly related to the object model, to custom forms in Microsoft Office Outlook 2003 or in earlier versions of Outlook, or to the form regions in Outlook 2007.

Known issues when you develop custom solutions for Office Outlook 2007
http://support.microsoft.com/kb/929590

Outlook Programming Series # 8 : How to update existing items in an Outlook folder to use a new custom form?


Welcome to Outlook Programming series  # 8


In this series, we will learn “How to update existing items in an Outlook folder to use a new custom form?”. I found this MSDN article which describes programatically how to update existing items in an Outlook folder to use a new custom form? 


This article describes how to update items in an Outlook folder so that those items open using a different form than the form that the items are currently associated with.

Outlook Custom form Issue: Listbox control unexpectedly adds new value


When using a custom form containing a ListBox control, Outlook unexpectedly adds a new possible value to the control.


Do you know….this behavior is due to the storage limitation of Keywords fields. If the control is bound to a field of type Keywords and you select a number of possible values in the control, the field may exceed its 255-character maximum length. This causes the last value to be truncated. Because the custom Keywords field now contains a new value that is not one of the options in the control, Outlook adds this new value to the list of possible choices in the control.


Please view this useful MSDN KB Article. It has the information about the issue, its cause, re-solution for this issue

Outlook Custom form Issue: Receive "Operation failed" error message


When you send an item that is based on a custom form, the form is not sent and you receive the following error message: “Operation Failed” 


This issue will happen if, a Recipient field on the custom form is configured with an initial value and with the Calculate this formula automatically option for that value.


Please view this useful MSDN KB Article. It has the information about the issue, its cause, workaround solution for this issue.

Outlook Programming Series # 3 : Click Event Behavior for Standard Controls


Welcome to Outlook Programming series  # 3


In this series, we will learn “How to get Click Event Behavior for Standard Controls?”. I found this wonderful article, which describes how the standard controls that are included with Microsoft Office and Outlook respond to the Click event using Visual Basic Scripting Edition (VBScript) on a custom Outlook form.


The Click event is the only event that Outlook supports for controls. However, for some controls the Click event may not fire if the control is bound to a field, or it may not fire at all.


Note: This articles summarizes whether or not the Click event will fire under various circumstances.