OL97: Custom Forms and Programming Limitations

ID: Q172752


The information in this article applies to:
  • Microsoft Outlook 97


SUMMARY

This article describes known limitations you may encounter when creating custom forms and programming solutions with Microsoft Outlook 97. Issues covered include limitations of the object model and other limitations related to the architectural design of Outlook.

The following topics are covered in this article:

  • Changing Option Settings


  • Modifying Folder Properties


  • Setting Views


  • Modifying the Outlook Bar


  • Programming Rules for Incoming Mail


  • Posting a File to a Folder


  • Using Office Forms (Office Document Items)


  • Changing the Mouse Pointer to an Hourglass


  • Storing RTF Information in Message Controls


  • Dragging Outlook Items to an OLE Container Control


  • Contact Form Functionality


  • Cut and Paste Functionality



MORE INFORMATION

The Outlook object model focuses on folders and the Outlook items in folders, not the program itself. This means that while you can manipulate forms and folders, many of the commands or settings that are available through the user interface are not available when programming.

When using the Outlook object model, it is important to note that information is usually set directly to the form item. This may result in different behavior compared to when a user enters information through the user interface. Many of the IntelliSense features are handled at the program level, not the form level. This means that these IntelliSense features do not apply when programmatically modifying forms.

There are also controls and field types that Outlook uses on forms whose functionality is directly incorporated into the program itself and generally not customizable.

These architectural design considerations are the basis for most of the Outlook programming limitations, and should be taken into account when designing a solution.

NOTE: The scope of this article is limited to Microsoft Visual Basic Scripting Edition (VBScript), and typically does not take into account possible solutions using the Active Messaging object model or other Microsoft Exchange-related programming technologies. For more information about these technologies, please consult information provided by the Microsoft Developer Network (MSDN) at the following Microsoft Web site:

http://www.microsoft.com/msdn
NOTE: Because the Microsoft Web site is constantly updated, the site address may change without notice. If this occurs, link to the Microsoft home page at the following address:
http://www.microsoft.com/

Changing Option Settings

There is no way to programmatically change any of the program-level settings in Outlook, since these are not exposed by the object model. Examples are any of the settings in the Tools Options dialog box. However, if you are initially deploying Outlook in a corporate environment, you may be able to change these setting during Setup using .PRF modifications.

For more information on setting up custom Outlook profiles, please see the following article in the Microsoft Knowledge Base:
Q166778 OL97: Contents of the Profile.doc Readme File

Modifying Folder Properties

Outlook's object model does not expose folder properties, such as the default form to use for the folder, synchronization settings, or AutoArchive settings

Setting Views

There is no way to programmatically set or configure views, which includes all of the features listed under the View menu. These options are not exposed by the Outlook object model.

Modifying the Outlook Bar

There is no way to programmatically add folders or items to the Outlook Bar. All changes must be made through the user interface.

Programming Rules for Incoming Mail

Because all VBScript code is stored within individual Outlook items (such as messages or contacts), there is no simple way to execute code (fire an event) when mail enters the Inbox. The Inbox Assistant and Rules Wizard do not provide this functionality.

To work around this limitation, set up a rule using the Inbox Assistant or Rules Wizard to forward all relevant messages to an "unprocessed" folder. Create a relatively simple Microsoft Visual Basic program that automates Outlook at regular intervals; the application would batch-process the items in the folder and then move or delete them as appropriate.

Posting a File to a Folder

There is no way to post a file (as opposed to an Outlook item, such as a contact, appointment, task, and so on) to a folder using VBScript or the Outlook object model.

Microsoft Word 97 and Microsoft Excel 97 do support a Post method if you want to post a Word document or Microsoft Excel workbook, but there is no direct way to specify a folder from within those programs. The Post method in these programs will display a dialog box prompting the user for a folder.

Using Office Forms (Office Document Items)

If you are using a Word Office form, Word will not execute any document event procedures, such as Document_Open. This is a design limitation of Word and is not specific to Office forms. Word does not support document event procedures when the Word object is embedded within a container application, form, or control.

Changing the Mouse Pointer to an Hourglass

You cannot control the appearance of the mouse pointer from VBScript. If you are writing VBScript code that takes some time to process, you cannot force Outlook to display an hourglass pointer if Outlook does not do it automatically.

Storing RTF Information in Message Controls

Each Outlook item can only have one message (or notes) control to store Rich Text Format (RTF) information, including attachments. It is possible to add more than one control per form, but the controls will all be bound to the same field, so they will display the same information.

Dragging Outlook Items to an OLE Container Control

You can use an OLE container control on a Visual Basic form to hold objects that are dragged onto it. When Outlook items are dragged onto these controls, Outlook exposes only a few fields, and there is no way to change which fields are exposed.

Simulating Contact Form Functionality

You cannot modify any of the default Contact form pages. If you create a custom form page, you cannot (or cannot fully) recreate the following default functionality:
  • The Check Names and Address buttons on the General tab of the Contact form Clicking these buttons displays dialog boxes that cannot be displayed from a custom form page.


  • The e-mail address fields
    When dragged from the Field Chooser to a custom form page, the e-mail address fields are read-only and cannot be modified. This is a limitation related to the e-mail address fields being a "recipient" type, which is not a typical field type for fields and controls.


  • The Birthday and Anniversary fields on the Details page of the form
    The Birthday and Anniversary fields on the Details page of the form use a calendar control that is internal to Outlook and cannot be used on a custom form page.


For more information about replicating the Categories button functionality, please see the following article in the Microsoft Knowledge Base:
Article-ID: Q173589 OL97: How to Create a Categories Button on a Custom Form Page

Cut and Paste Functionality

Outlook's object model does not support using the Clipboard in any way.


REFERENCES

For more information about creating solutions with Microsoft Outlook 97, please see the following articles in the Microsoft Knowledge Base:

Q166368 OL97: How to Get Help Programming with Outlook
Q170783 OL97: Q&A: Questions about Customizing or Programming Outlook

Additional query words: OutSol OutSol97 drag drop drag-and-drop simulate

Keywords : kbprg FmsProb ScriptHowTo kbprb
Version : WINDOWS:97
Platform : WINDOWS
Issue type : kbhowto


Last Reviewed: November 16, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.