VBS Script Not Executing

  • Thread starter Thread starter JHEK
  • Start date Start date
J

JHEK

Hi,
I'm trying to create my first Outlook form and having a
problem.

Basicall, I created a command button on a message form and
added VB Script to give me a message box indicating that
the event is triggered properly.

I then published it, then tried generating the form. When
I click the button, I get the message box indicating that
the click event for the command button. But when I send
the message to myself and open it, the VB Script does not
get invoked from the command button anymore.

Any help would be appreciated. Thanks.
 
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 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.slipstick.com/outlook/esecup.htm#formsec 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.slipstick.com/dev/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.
 
Back
Top