OL98: Questions About Custom Forms and Outlook Solutions
ID: Q182349
|
The information in this article applies to:
SUMMARY
This article answers some of the more commonly asked questions about
creating custom Microsoft Outlook 98 forms or programming Outlook either
through Microsoft Visual Basic Scripting Edition (VBScript) or Visual Basic
for Applications Automation.
Topics covered include:
- Available resources for customizing Outlook
- Setting up a simple form for use in a folder (message classes)
- Custom forms and programming limitations
- Disabling the enable/disable macro virus warning
- Cannot select a control in design mode
- Data does not get saved with form
- Programmatically referring to folders and Items
- How to use Automation with Outlook
- One-off forms
- Programmatically importing Items into Outlook
- Using address books in a solution
- Using the SetColumns method
- Working with User-defined fields
- Using Outlook 98's new contact fields
- Control and field events
- General information about VBScript
MORE INFORMATION- Where do I get started with custom forms or programming Outlook?
For more information about available resources for learning how to create
solutions with Outlook 98, please see the following article in the
Microsoft Knowledge Base:
ARTICLE-ID: Q180826
TITLE : OL98: Resources for Custom Forms and Programming
- I have created a custom form for my Contacts, Tasks, and so on, but it
is not being used when I create a new item, when I open an existing
item I had before I created the form, or when I create a new item.
Why is my form not being used?
To use a custom Outlook form, there are three steps you need to complete.
First, publish the form in the folder or forms library where you will use
it. On the custom form File menu, click Publish Form. The name of the form
is also the "Message Class," which is important for the next two steps.
Second, make this new form the default form for that folder. Using your
right mouse button, click the folder and from the shortcut menu, click
Properties. In the "When posting to this folder, use" list, click to
select your custom form. Now new items that you create will use the custom
form instead of the default Outlook form.
Third, if you have any existing items in the folder that should use this
new form, you must change the Message Class field in each of the items in
the folder. The Message Class field of an item tells Outlook which form to
use to display the item. You cannot directly change this field from an
Outlook since it is considered read-only, but you can use VBScript or
Automation code to change it.
For more information about changing the message class of an item in a
folder, please see the following articles in the Microsoft Knowledge Base:
ARTICLE-ID: Q182274
TITLE : OL98: How to Update Existing Items to Use a New
Custom Form
ARTICLE-ID: Q201089
TITLE : OL2000: Word 97 Document to Change Outlook Folder
Message Class
- I am trying to do something but it doesn't seem possible. Is it?
Outlook does not support a "full" object model, such as those in Microsoft
Word or Microsoft Excel, so what you are trying to do may not be possible.
Also, there may be other Outlook design considerations or limitations that
may prevent you from using a desired approach in creating a solution.
For more information about some of the more common things that cannot be
done with custom forms, VBScript, or Outlook Automation, please see the
following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q182402
TITLE : OL98: Custom Forms and Programming Limitations
- How can I disable the macro warning?
If the form is not located in a trusted location, then Outlook will display
the macro warning for your protection against potentially
maliciously-written programming code, commonly called macro viruses.
Disable the Macro Warning
- Open the form that causes the Macro Warning dialog to open.
- On the Tools menu, point to Forms and click Design This Form.
- On the Properties tab, click to uncheck Send form definition with LI.
- On the Tools menu, point to Forms, and click Publish Form.
- Close the form. It is not necessary to save the changes if prompted.
For more information about this issue, please see the following article in
the Microsoft Knowledge Base:
ARTICLE-ID: Q182376
TITLE : OL98: Why Outlook Displays a Security Warning Opening
an Item
- I entered design mode to change a form I created, but now I can't select
any of the controls on the form page. How come?
This is a problem in Outlook 98 that you can workaround by switching to a
different form page and then switching back to the page you wish to edit.
For more information about this issue, please see the following article in
the Microsoft Knowledge Base:
ARTICLE-ID: Q183327
TITLE : OL98: Cannot Select Controls in Design Mode
- I created a custom form and it looks great, but when I close and then
re-open the item, or when I send the form to someone else, all of the
information I entered into my custom controls is gone. Why does this
happen?
In Outlook, controls on a form are used to display information, but the
information is actually stored in fields. Therefore, in order for the
values of the controls to be preserved, the control must be bound to an
Outlook standard or user-defined field.
For more information about this issue, please see the following article in
the Microsoft Knowledge Base:
ARTICLE-ID: Q182362
TITLE : OL98: How to Use Fields and Controls with VBScript
- Using VBScript or automation code, how do I refer to a particular
Outlook folder or a particular item in a folder? Or, how do I create a new
folder or item?
For more information about referencing folders and items, please see the
following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q182614
TITLE : OL98: Programming Examples for Referencing items and Folders
- How do I get started automating Outlook from another program?
For information on automating Outlook from another program, please
see the following articles in the Microsoft Knowledge Base:
ARTICLE-ID: Q181202
TITLE : OL98: How to Automate Outlook from Another Program
ARTICLE-ID: Q170262
TITLE : HOWTO: Use OLE Automation with Microsoft Outlook 97
- Why do some items in a folder have different icons? Why do some
of the items in the folder have an abnormally large size? Why does the
Message Class of an item change back to the default Message Class?
How can I get a better understanding of how forms work in Outlook.
For more information about these questions, please see the following
article in the Microsoft Knowledge Base:
ARTICLE-ID: Q181266
TITLE : OL98: Working with Form Definitions and One-Off Forms
- When importing contacts from an external database, how do I map some of
the fields to the user-defined fields that I have set up in a custom
contact form?
This is a limitation of the Outlook Import and Export Wizard. If you are
familiar with Visual Basic programming, you can create a solution that
programmatically imports or exports the information.
For more information about this issue, please see the following articles in
the Microsoft Knowledge Base:
ARTICLE-ID: Q180829
TITLE : OL98: Cannot Import or Export User-defined Contact
Fields
ARTICLE-ID: Q180981
TITLE : OL98: Programmatically Import Outlook Items From MS Access
- How come when I export items from a folder, all of the items are not
exported?
Outlook 98 does not export items if they are based on a custom form,
meaning that the message class field of the item is not the default message
class for that type of item, such as IPM.Contact or IPM.Note.
For more information about this issue, please see the following article in
the Microsoft Knowledge Base:
ARTICLE-ID: Q184677
TITLE : OL98: OL98: All Items in Folder Are Not Exported
- How do I set a default form for my Inbox?
There is no direct way of doing this, but a workaround is to publish the
message form to the folder, and then create a new mail item by clicking the
form at the bottom of the Actions menu.
For more information about this issue, please see the following article in
the Microsoft Knowledge Base:
ARTICLE-ID: Q180858
TITLE : OL98: Cannot Change the Default Mail Message Form
- How can I integrate address books with my solution?
For a top-level overview of working with address books in a custom
solution, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q193457
TITLE : OL98: Using Address Books in an Outlook Solution
- How do I use the SetColumns method?
For more information about using SetColumns, please see the following
article in the Microsoft Knowledge Base:
ARTICLE-ID: Q184462
TITLE : OL98: How to Use the SetColumns Method
- User-defined fields aren't working the way I expect. How come?
For more information about using user-defined fields in Outlook, please see
the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q185050
TITLE : OL98: Working With User-defined Fields in Solutions
- I see there's new fields available in Outlook 98 for the contact form,
but how can I use them?
For more information about using the new Outlook 98 contact fields, please
see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q185239
TITLE : OL98: Using the New Contact Fields on a Custom Form
- When I use a custom control on my Outlook form, none of the
events appear to work. Why?
Outlook only supports the Click event for controls. Many controls are
specifically designed to work with other events, and since these events are
not supported by Outlook, the controls may not function in Outlook.
To work around this situation, create a Visual Basic (VB) 5.0 ActiveX
component (formally called an OLE server application). You start the
component by using the CreateOject method in the Outlook object model. The
component would display a VB 5.0 form with the appropriate controls, get
the information that the user selects or types, and then automate Outlook
to send any necessary information back to the Outlook form.
This technique involves many aspects of programming. For information on how
to create an ActiveX component, please see your documentation for Visual
Basic 5.0.
- When I retrieve appointments and the folder has recurring appointments,
the only items retrieved are the initial appointment. Why?
You have to set the IncludeRecurrences property of the items collection to
true. The default is false, which means that only the original appointment
is returned. This is commonly an issue when using the Find or Restrict
methods to return a collection of appointment items.
For more information about this issue, please see the following
articles in the Microsoft Knowledge Base:
ARTICLE-ID: Q181190
TITLE : OL98: How to Retrieve All Recurring Appointments
with Code
ARTICLE-ID: Q181189
TITLE : OL98: How to Use the Restrict Method
- How can I tell what version of VBScript a computer is using? Where
is the documentation for VBScript? Why doesn't Outlook support
Visual Basic for Applications?
For more information about VBScript, please see the following
article in the Microsoft Knowledge Base:
ARTICLE-ID: Q182446
TITLE : OL98: General Information About Using VBScript
with Outlook
- How can I start another program or display a Web page from an
Outlook form?
You can use the CreateObject method in VBScript to automate an
OLE-aware application.
For more information about this issue, please see the following articles
in the Microsoft Knowledge Base:
ARTICLE-ID: Q181206
TITLE : OL98: How to Start Another Program from an Outlook
Form
ARTICLE-ID: Q181267
TITLE : OL98: How to Display a Web Page in an Outlook Form
Additional query words:
FAQ OutSol OutSol98
Keywords : kbprg
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbinfo
|