There are two major causes of code in an Outlook form not running -- 1) security settings in Outlook 2003 and 2) the broader form script security features introduced with the Outlook Email Security Update.
#1: Outlook 2003 includes a new setting -- turned off by default -- to allow forms in shared mailboxes to run script. You can change the setting by choosing Tools | Options | Other | Advanced Options and checking the box for Allow script in shared folders. See
http://www.outlookcode.com/d/ol2003problems.htm#mailboxscript for more information on this setting and a comparable one (on by default for public folders).
#2: If the form runs code when you use Run This Form in design mode, but doesn't run code after you have sent or saved an item using the published form, you probably have done something to "one-off" the form. Outlook 2003, Outlook 2002, Outlook 2000 SP2 and Outlook 2000 or 98 with the Email Security Update will not run code on one-off forms; see
http://www.outlookcode.com/d/secforms.htm for more information on this issue.
To ensure that a form does not one-off:
-- Make sure the "Send form definition with item" box on the (Properties) tab of the form is *not* checked. [1]
-- For in-house corporate use with Exchange Server, publish the form to the Organization Forms library or a public folder's forms library, as appropriate for your application.
-- For collaboration via the Internet, publish your form to your Personal Forms library. Save it as an .oft file and send it to other people who need to use it with instructions to publish it with the same form name that you used.
Many other things can cause one-off forms. If the above steps don't work on a new item created with your form, see
http://www.outlookcode.com/d/formpub.htm#oneoff for other possible causes.
[1] Whenever you publish a message form, Outlook will suggest that you may want to check the "Send form definition with item" box to ensure that the recipient will have the form, especially if you're sending to someone via the Internet. In the current Outlook security environment, this suggestion is obsolete. Ignore it unless your form has no code behind it.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
AIK said:
Hi!
I need to fix a Designed Form in Outlook 2003. A contact form is done with a
previous version of Outlook, and the custom buttons are not working anymore.
When I select Tools|Forms|Design This Form..., and Form|View Code..., I can
see the event handlers for the buttons on the form, but nothing is runned
after i click the buttons that should fire the events. Where are the event
handlers hooked to the buttons?? I cant find any event handler associations
anywhere.
I have no former experience about Outlook 2003 designed forms, if someone
know how I make buttons with custom events, I would appreciate all help!
Thanks, Antti