Board index » Outlook » Outlook 2003 - Before send automation

Outlook 2003 - Before send automation

Outlook653
Hi,



I have a template form already created and in use. However the template has

several fields that must have have to be filled.



I cannot find a way to validate those fields, when I press the send button.

If for some reason, one or another field is not filled, the user must be

notified for the need to fill the specified fields.



So basicly, what I would need is some kind of automation implemented and

embbed in the template (since it is used by several users inside a corporate

net), in order to validate the template fields, before sending the e-mail.



Thanks,

Pedro Redondo


-
 

Re:Outlook 2003 - Before send automation

Simple validation can be done on the Properties dialog for each control. =

You'll find a Validation tab there. The alternative is to write VBScript =

code behind the form and publish it.=20



FYI, there is a newsgroup specifically for Outlook forms issues "down =

the hall" at microsoft.public.outlook.program_forms or, via web =

interface, at =

http://www.microsoft.com/office/community/en-us/default.mspx?dg=3Dmicroso=

ft.public.outlook.program_forms

--=20

Sue Mosher, Outlook MVP

Author of Configuring Microsoft Outlook 2003

http://www.turtleflock.com/olconfig/index.htm

and Microsoft Outlook Programming - Jumpstart for=20

Administrators, Power Users, and Developers

http://www.outlookcode.com/jumpstart.aspx

=20

"paredondo" <paredondo@discussions.microsoft.com>wrote in message =

Quote
Hi,

=20

I have a template form already created and in use. However the =

template has=20

several fields that must have have to be filled.=20

=20

I cannot find a way to validate those fields, when I press the send =

button.=20

If for some reason, one or another field is not filled, the user must =

be=20

notified for the need to fill the specified fields.

=20

So basicly, what I would need is some kind of automation implemented =

and=20

embbed in the template (since it is used by several users inside a =

corporate=20

net), in order to validate the template fields, before sending the =

e-mail.

=20

Thanks,

Pedro Redondo

-

Re:Outlook 2003 - Before send automation

Hi,



Thanks Sue for your information. Sorry not to put the question in the

newsgroup area. I'll open a new thread there since I could not find one to

satisfy my need.



After that, can you please, tell me what kind of code should I use and where

(an example would be a must).



Thanks,

Pedro Redondo



"Sue Mosher [MVP-Outlook]" wrote:



Quote
Simple validation can be done on the Properties dialog for each control. You'll find a Validation tab there. The alternative is to write VBScript code behind the form and publish it.



FYI, there is a newsgroup specifically for Outlook forms issues "down the hall" at microsoft.public.outlook.program_forms or, via web interface, at http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_forms

--

Sue Mosher, Outlook MVP

Author of Configuring Microsoft Outlook 2003

http://www.turtleflock.com/olconfig/index.htm

and Microsoft Outlook Programming - Jumpstart for

Administrators, Power Users, and Developers

http://www.outlookcode.com/jumpstart.aspx



"paredondo" <paredondo@discussions.microsoft.com>wrote in message news:54071C20-756B-4F49-B497-8758661F590F@microsoft.com...

>Hi,

>

>I have a template form already created and in use. However the template has

>several fields that must have have to be filled.

>

>I cannot find a way to validate those fields, when I press the send button.

>If for some reason, one or another field is not filled, the user must be

>notified for the need to fill the specified fields.

>

>So basicly, what I would need is some kind of automation implemented and

>embbed in the template (since it is used by several users inside a corporate

>net), in order to validate the template fields, before sending the e-mail.

>

>Thanks,

>Pedro Redondo



-

Re:Outlook 2003 - Before send automation

For a text property:=20



Function Item_Send()

If Item.UserProperties("MyProperty") =3D "" Then=20

Item_Send =3D False

End If=20

End Function



--=20

Sue Mosher, Outlook MVP

Author of Configuring Microsoft Outlook 2003

http://www.turtleflock.com/olconfig/index.htm

and Microsoft Outlook Programming - Jumpstart for=20

Administrators, Power Users, and Developers

http://www.outlookcode.com/jumpstart.aspx

=20

"paredondo" <paredondo@discussions.microsoft.com>wrote in message =

Quote
Hi,

=20

Thanks Sue for your information. Sorry not to put the question in the=20

newsgroup area. I'll open a new thread there since I could not find =

one to=20

satisfy my need.

=20

After that, can you please, tell me what kind of code should I use and =

where=20

(an example would be a must).

=20

Thanks,

Pedro Redondo

=20

"Sue Mosher [MVP-Outlook]" wrote:

=20

>Simple validation can be done on the Properties dialog for each =

control. You'll find a Validation tab there. The alternative is to write =

VBScript code behind the form and publish it.=20

Quote
>=20

>FYI, there is a newsgroup specifically for Outlook forms issues "down =

the hall" at microsoft.public.outlook.program_forms or, via web =

interface, at =

http://www.microsoft.com/office/community/en-us/default.mspx?dg=3Dmicroso=

ft.public.outlook.program_forms



Quote
>=20

>"paredondo" <paredondo@discussions.microsoft.com>wrote in message =

>>Hi,

>>=20

>>I have a template form already created and in use. However the =

template has=20

>>several fields that must have have to be filled.=20

>>=20

>>I cannot find a way to validate those fields, when I press the send =

button.=20

>>If for some reason, one or another field is not filled, the user =

must be=20

>>notified for the need to fill the specified fields.

>>=20

>>So basicly, what I would need is some kind of automation =

implemented and=20

>>embbed in the template (since it is used by several users inside a =

corporate=20

>>net), in order to validate the template fields, before sending the =

e-mail.

>>=20

>>Thanks,

>>Pedro Redondo

>

-

Re:Outlook 2003 - Before send automation

Hi Sue,



I've just used the code you mentioned, but modified... and put it into de

Script editor. After that I've published the form.



Function Item_Send()



If (Item.UserProperties("ME") = False) And (Item.UserProperties("MC") =

False) And (Item.UserProperties("MP") = False) Then

MsgBox "Tem de Preencher 1 dos campos"

End If



End Function



The field names are ME, MC and MP.



After published, I opened a new message based on the form, I've just

published and when I send the e-mail, a small error box appeared saying

("Object variable not set, Line no. 3")



What am I doing wrong ?



Regards,

Pedro Redondo





"Sue Mosher [MVP-Outlook]" wrote:



Quote
For a text property:



Function Item_Send()

If Item.UserProperties("MyProperty") = "" Then

Item_Send = False

End If

End Function



--

Sue Mosher, Outlook MVP

Author of Configuring Microsoft Outlook 2003

http://www.turtleflock.com/olconfig/index.htm

and Microsoft Outlook Programming - Jumpstart for

Administrators, Power Users, and Developers

http://www.outlookcode.com/jumpstart.aspx



"paredondo" <paredondo@discussions.microsoft.com>wrote in message news:16CB7EE9-656E-49BB-B645-5C5DACED9B63@microsoft.com...

>Hi,

>

>Thanks Sue for your information. Sorry not to put the question in the

>newsgroup area. I'll open a new thread there since I could not find one to

>satisfy my need.

>

>After that, can you please, tell me what kind of code should I use and where

>(an example would be a must).

>

>Thanks,

>Pedro Redondo

>

>"Sue Mosher [MVP-Outlook]" wrote:

>

>>Simple validation can be done on the Properties dialog for each control. You'll find a Validation tab there. The alternative is to write VBScript code behind the form and publish it.

>>

>>FYI, there is a newsgroup specifically for Outlook forms issues "down the hall" at microsoft.public.outlook.program_forms or, via web interface, at http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_forms



>>

>>"paredondo" <paredondo@discussions.microsoft.com>wrote in message news:54071C20-756B-4F49-B497-8758661F590F@microsoft.com...

>>>Hi,

>>>

>>>I have a template form already created and in use. However the template has

>>>several fields that must have have to be filled.

>>>

>>>I cannot find a way to validate those fields, when I press the send button.

>>>If for some reason, one or another field is not filled, the user must be

>>>notified for the need to fill the specified fields.

>>>

>>>So basicly, what I would need is some kind of automation implemented and

>>>embbed in the template (since it is used by several users inside a corporate

>>>net), in order to validate the template fields, before sending the e-mail.

>>>

>>>Thanks,

>>>Pedro Redondo

>>



-

Re:Outlook 2003 - Before send automation

The error suggests that one of the three fields is not actually present =

on that item. You can see this for sure on the All Fields tab, under =

"user-defined fields in this item." Make sure all desired fields are =

present before you publish.=20



--=20

Sue Mosher, Outlook MVP

Author of Configuring Microsoft Outlook 2003

http://www.turtleflock.com/olconfig/index.htm

and Microsoft Outlook Programming - Jumpstart for=20

Administrators, Power Users, and Developers

http://www.outlookcode.com/jumpstart.aspx

=20

"paredondo" <paredondo@discussions.microsoft.com>wrote in message =

Quote
Hi Sue,

=20

I've just used the code you mentioned, but modified... and put it into =

de=20

Script editor. After that I've published the form.

=20

Function Item_Send()

=20

If (Item.UserProperties("ME") =3D False) And =

(Item.UserProperties("MC") =3D=20

False) And (Item.UserProperties("MP") =3D False) Then

MsgBox "Tem de Preencher 1 dos campos"

End If

=20

End Function

=20

The field names are ME, MC and MP.

=20

After published, I opened a new message based on the form, I've just=20

published and when I send the e-mail, a small error box appeared =

saying=20

("Object variable not set, Line no. 3")

=20

What am I doing wrong ?

=20

Regards,

Pedro Redondo

=20

=20

"Sue Mosher [MVP-Outlook]" wrote:

=20

>For a text property:=20

>=20

>Function Item_Send()

>If Item.UserProperties("MyProperty") =3D "" Then=20

>Item_Send =3D False

>End If=20

>End Function

>=20

>--=20

>Sue Mosher, Outlook MVP

>Author of Configuring Microsoft Outlook 2003

>http://www.turtleflock.com/olconfig/index.htm

>and Microsoft Outlook Programming - Jumpstart for=20

>Administrators, Power Users, and Developers

>http://www.outlookcode.com/jumpstart.aspx

>=20

>"paredondo" <paredondo@discussions.microsoft.com>wrote in message =

>>Hi,

>>=20

>>Thanks Sue for your information. Sorry not to put the question in =

the=20

>>newsgroup area. I'll open a new thread there since I could not find =

one to=20

>>satisfy my need.

>>=20

>>After that, can you please, tell me what kind of code should I use =

and where=20

>>(an example would be a must).

>>=20

>>Thanks,

>>Pedro Redondo

>>=20

>>"Sue Mosher [MVP-Outlook]" wrote:

>>=20

>>>Simple validation can be done on the Properties dialog for each =

control. You'll find a Validation tab there. The alternative is to write =

VBScript code behind the form and publish it.=20

Quote
>>>=20

>>>FYI, there is a newsgroup specifically for Outlook forms issues =

"down the hall" at microsoft.public.outlook.program_forms or, via web =

interface, at =

http://www.microsoft.com/office/community/en-us/default.mspx?dg=3Dmicroso=

ft.public.outlook.program_forms

Quote
>=20

>>>=20

>>>"paredondo" <paredondo@discussions.microsoft.com>wrote in message =

>>>>Hi,

>>>>=20

>>>>I have a template form already created and in use. However the =

template has=20

>>>>several fields that must have have to be filled.=20

>>>>=20

>>>>I cannot find a way to validate those fields, when I press the =

send button.=20

>>>>If for some reason, one or another field is not filled, the user =

must be=20

>>>>notified for the need to fill the specified fields.

>>>>=20

>>>>So basicly, what I would need is some kind of automation =

implemented and=20

>>>>embbed in the template (since it is used by several users inside =

a corporate=20

>>>>net), in order to validate the template fields, before sending =

the e-mail.

>>>>=20

>>>>Thanks,

>>>>Pedro Redondo

>>>

>

-