Sorry, the message was posted before i finished typing it.
here is the sample code:
Function CommandButton1_Click()
Msgbox "Test"
End Function
The form is published in Personal Form Library for
testing purpose and sent to myself and the send form
definition with item is selected.
That's the problem. Code doesn't run on one-off forms. Clear the "Send form
definition ..." box and republish.

Signature
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
> Sorry, the message was posted before i finished typing it.
>
[quoted text clipped - 11 lines]
> the "Send form
>>definition..." box on the (Properties) page?
>>"Michel" <anonymous@discussions.microsoft.com> wrote in
> message
[quoted text clipped - 5 lines]
>>
>>.
Michel - 04 Oct 2004 18:54 GMT
I tried removing the send form definition, republished
the form and sent it to myself and the code is still not
executed.
>-----Original Message-----
>That's the problem. Code doesn't run on one-off forms. Clear the "Send form
[quoted text clipped - 27 lines]
>
>.
Sue Mosher [MVP-Outlook] - 29 Oct 2004 14:45 GMT
Are you sure that you're sending the new version? If you incremented the
version number (which you should always do), you'll be able to check on the
Help | About This Form dialog?
Also, a Click event handler should be a Sub not a Function. Did you
double-check that the control name matches the procedure name?

Signature
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
>I tried removing the send form definition, republished
> the form and sent it to myself and the code is still not
[quoted text clipped - 32 lines]
>>>>>
>>>>> sub commandbutton1()