Validation of fileds in Item_Send function

L

Long Nguyen

(Outlook 2002.)

I have a custom outlook form for change requests that is based on the
Message form. The fields on the form are validated through the Properties
dialog of the form controls. However for some fields I want to do extra
validation before the form is sent and it seems that the place to do this is
through the Item_Send function in vbscript code. What I want is that when a
field is found not valid through the check in Item_Send function the form is
not sent and the user has to put in valid value and press the Send button
again.

The problem is that whenever the Send button is click the form is always
sent and closed. Is there anyway to control the sending of the form in the
Item_Send function? Or my way of validating fields through Item_Send
function is not the right way to use for validation?

Thanks.
 
S

Sue Mosher [MVP-Outlook]

Set the value of the function to False:

Function Item_Send()
If <your criteria are not met> Then
Item_Send = False
End If
End Function
 
L

Long Nguyen

Many thanks Sue. Now I am able to get the form perfoems teh way I want.

Regards
Long
Set the value of the function to False:

Function Item_Send()
If <your criteria are not met> Then
Item_Send = False
End If
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top