MS Outlook 2010 custom form - validation or formula to request user to check a checkbox

Status
Not open for further replies.

Potty Ash

Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server 2013
Hi,

I have a checkbox on my custom outlook form which needs to be checked by the user before it is sent. For some reason the "A value is required for this field" is greyed out. Could somebody please help me with a formula or solution that would force the user to check the box and not leave it blank. My checkbox is associated with a Yes/No field type, format: Yes/No and property to use: Value. I've tried all different options, i.e. On/Off, True/False, TripleState, etc. but to no avail.

Any assistance would be greatly appreciated.
 
Do you have script behind the form? If so, you use use the before close function to check for a value.

This is apparently a limitation of yes/no fields - not sure why though (possibly because it's either check or not). If you can use a text field, that will work.
 
Good afternoon Diane,

Thank you very much for responding. In the end I found some code and modified it a bit.

Code:
Code:
Function Item_Send()
Set objInsp = Item.GetInspector
Set objPage = objInsp.ModifiedFormPages("Message")
Set ck = objPage.Controls("CheckBox1")
If ck.Value = False Then
Msgbox ("Please confirm that this mail request is releated to work activities")
Item_Send = False
End If
'MsgBox "Item being sent without a winmail.dat file attached"
'Item.PropertyAccessor.SetProperty "http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/8582000B", False
End Function
Don't ask me what it all means but it seems to work!:(

I don't like the fact that custom forms do not display in the preview/reading pane. Even with the two lines of code above it still didn't work.

Regards,

Potty Ash
 
I don't like the fact that custom forms do not display in the preview/reading pane.
In older versions with limited capabilities in the reading pane, it was security issues and the inability to show controls in the reading pane. With the improvements in the pane's capabilities, they could probably show controls now, but it is a security risk (and they are tightening things up lately in regards to controls and code in forms.)
 
Don't ask me what it all means but it seems to work!

this part is saying, if the box on the message page is not checked, don't send.
Set objPage = objInsp.ModifiedFormPages("Message")
Set ck = objPage.Controls("CheckBox1")
If ck.Value = False Then
Item_Send = False
End If

This (if it wasn't commented out) is setting the TNEF property to false, "don't use TNEF"( aka RTF). This would convert the message to plain text. Generally speaking, you need TNEF for meeting requests, task requests/updates, and voting. It's optional in normal email and shouldn't be used outside of exchange.
Code:
Item.PropertyAccessor.SetProperty "http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/8582000B", False
 
Thanks Diane for the information, it's good to know.

I have noticed that my custom form's ribbon has replaced the standard tab title 'Message' with the name I gave my form which is 'Express Mail Request'. The tab is identical to the standard 'Message' tab except my ribbon 'Express Mail Request' contains a group, namely 'Show' which has two commands 'Message' and 'P.2'. Is this normal or have I completely gone wrong somewhere? The message class states IPM.Note.Express Mail Request.
 
contains a group, namely 'Show' which has two commands 'Message' and 'P.2'.
This means that you put something on the formerly hidden tab named P.2. You can rename it from the Page menu in the designer.

It's hidden in this screenshot, but putting any control on it will automatically unhide it - and the () are removed from the name. If you delete whatever you added to it, it remains visible but can be hidden from the Page menu.

form-page.png
 
So I don't really need any fields, controls, etc. on P.2? Currently, the 'Message' and 'P.2' pages are identical.
 
No, you don't have to use it or show it, unless you need it for some reason, in which case, you can rename it.
 
Thanks for that Diane. Also, as my 'Compose' and 'Read' pages are the same I'm assuming I don't need 'Separate Read Layout'?

If I may ask, is it possible to launch a custom form externally from Outlook itself. The plan now is to get our network administrator to publish the form to the exchange server (the Organizational Forms Library I believe) where I hope it will be available to the users. However, access to the form must be from our extranet through a hyperlink and not Outlook.
 
my 'Compose' and 'Read' pages are the same I'm assuming I don't need 'Separate Read Layout'?
Yeah, you don't need a separate read layout if they are identical.

However, access to the form must be from our extranet through a hyperlink and not Outlook.
A specially crafted hyperlink, yes, but Outlook needs to be installed to use it.
 
I'm just waiting for our network administrator to publish my form to the Organizational Forms Library. Out of interest, is this something he will do from my machine, i.e. logon as an administrator and publish or do I need to send him an .oft or .msg file?

In the meantime I've been testing the form from the Personal Forms Library by sending it to myself and also a few users ('Send form definition with item' checked). To my surprise when 'Replying' and 'Replying to All' we notice that the form and its contents are not included. The 'Forward' function is okay.
 
You'll need to provide it to him as a fdm file or an oft, as he'll need to use an account that has permission to publish to the Org library.
 
Hi Diane, thanks once again for the information. I've been reading through some of the forum posts to get a better understanding of custom forms in general.

Would you happen to know why there are no Actions defined/listed on my form's Actions page, even though the form seems to work okay, albeit with the usual quirks and limitations of a custom form. Have I done something drastically wrong because I've just experimented by creating a new form based on a Message item and I can see the following listed Actions: 'Reply', 'Reply to All', 'Forward' and 'Reply to Folder' all enabled.

This leads me to my final question (a possible show stopper). Is it true to say that a custom form (in a mail/message) and its field data will not appear in a reply by the recipient? As I mentioned in my post yesterday, when I want to forward the message it's included.
 
Actions: 'Reply', 'Reply to All', 'Forward' and 'Reply to Folder' all enabled.
these should be listed as long as you didn't delete them.

props.png


Is it true to say that a custom form (in a mail/message) and its field data will not appear in a reply by the recipient?
possibly. it should work when everyone is on the same exchange and the form is published to the org library, but may not work with other addresses unless you include the forms definition (and that is no guarantee).
 
I'm not sure what happened but I must have deleted them somehow. Can I recreate the Actions or is it best to start a new form and copy all the fields across?

I'll wait and see what happens regarding the 'Reply' issue when the form is published to the Organizational Forms Library. Cheers Diane.
 
If the form is not too complicated to recreate, i would recreate it but you can add the fields back if it is complicated.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
I Error saving screenshots in a custom form in outlook 2016, outlook 365 - ok in outlook 2013, outlook 2010 Outlook VBA and Custom Forms 5
D create an html table in outlook custom form 2010 using vba in MsAccess Outlook VBA and Custom Forms 7
D Change sender name outlook vba 2010 Custom Userform Outlook VBA and Custom Forms 1
J Outlook 2010: can't forward appointment on custom form Using Outlook 1
G Custom Form code not working - Outlook 2010 Outlook VBA and Custom Forms 2
S Setting up Outlook 2010 to work with custom domain outlook.com account BCM (Business Contact Manager) 3
P Outlook 2010 custom form olk control font size increases everytime form is published Outlook VBA and Custom Forms 1
S Seeing Custom Fields in Contacts (Outlook 2010) Using Outlook 0
F Outlook 2010 - Need help with a custom field. Using Outlook 3
F Outlook 2010 custom font style duplicates itself every time I save a task Using Outlook 0
C Set reminder time in custom form (Outlook 2010) Using Outlook 1
C Custom Form Outlook 2010 Contacts Using Outlook 3
P Unable to delete custom forms in outlook 2010 Using Outlook 1
C Outlook 2010 Custom Form Issues Using Outlook 2
M Outlook 2010 Custom Form Problem Using Outlook 1
O Outlook 2010 - How to create custom Group By Arrangements for email Using Outlook 3
S Adding a recipient's column to Sent folder in Outlook 2010 Outlook VBA and Custom Forms 1
e_a_g_l_e_p_i Can emails from Gmail be deleted when they are downloaded to Outlook 2010 Using Outlook 1
L Outlook 2010 Outlook 2010 Outlook VBA and Custom Forms 2
C What folders are needed when reinstalling Outlook 2010 Using Outlook 0
e_a_g_l_e_p_i Gmail in Outlook 2010 preview issue Using Outlook 4
e_a_g_l_e_p_i Outlook 2010 Help setting up Gmail account in Outlook 2010 Using Outlook 3
B Outlook 2016 Unable to view images or logos on the outlook 2016 emails the same html code works well when i use outlook 2010 Using Outlook 0
M Outlook 2010 Outlook 2010 with O365 / Exchange Online Using Outlook 0
F Outlook 2010 Outlook 2010 and GMail Using Outlook 0
D Outlook 2007 vs. Outlook 2010 -- ToDo Bar Using Outlook 0
e_a_g_l_e_p_i I think it may be time to upgrade from Outlook 2010 Using Outlook 3
T Why does outlook 2010 convert only some forum notifications to plain text? Using Outlook 0
M Outlook 2010 Problem with OutLook 2010 32 bit, after Windows Auto Update Using Outlook 3
M PST import from Outlook 2007 to 2010 - Address Book contacts all in 1 group Using Outlook 4
D Outlook 2010 account setup fails in particular domain Using Outlook 3
B Outlook 2010 is Auto Purging when not configured for that Using Outlook 1
W Outlook 2010 Reading Pane Slows Startup Using Outlook 3
S Outlook 2010 unable to change default font Using Outlook 7
B Outlook 2010 Can not find a certain file in M/S Outlook 2010. Using Outlook 1
Mark Foley Cannot enable add-in in outlook 2010 Using Outlook 0
W Outlook 2010 some sent items marked unread now (was Ok before) Using Outlook 0
RBLampert Updating from Outlook 2010 to Outlook 365 Using Outlook 0
L What are the risks of opening an Outlook 2016 .pst file in Outlook 2010? Using Outlook 4
S Unable to remove rule outlook 2010 Using Outlook 0
N Outlook 2010 Flag blocked for Safe Senders List???? Using Outlook 7
dweller Outlook 2010 Rule Ignores VBA Script Outlook VBA and Custom Forms 2
Mark Foley Unable to subscribe to published calendar in Outlook 2010 Using Outlook 4
K Maximum Categorize Shortcuts In Outlook 2010? Using Outlook 1
E Unable to open Outlook 2010 after adding new email account Using Outlook 4
RBLampert Outlook 2010 no longer (?) shrinks large images Using Outlook 4
N Outlook 2010 will not send nor receive Using Outlook 4
U Outlook 2010 'freezes' before moving emails Using Outlook 2
P Outlook 2010 trusted emails going to spam folder Using Outlook 18
E Outlook 2010 Subject sort uses Thread-Topic for grouping Using Outlook 2

Similar threads

Back
Top