A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Custom Form - Checkboxes



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 7th 07, 03:57 PM posted to microsoft.public.outlook.program_forms
Scott07
external usenet poster
 
Posts: 28
Default Custom Form - Checkboxes

Hi,

I'm attempting to create a custom contact form with 3 checkboxes that, when
checked, will add the form to a category (e.g. where Business, Competition,
Favorites, etc. are shown under "Available Categories"). For example, if the
checkboxes were named test1, test2, and test3; after those three were
checked, I'd like the form to be automatically classified under the
"Business" category.

Any help is appreciated.

Thanks.
  #2  
Old June 7th 07, 04:15 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Custom Form - Checkboxes

You'll need to do this in code behind the form, in the Item_Write event handler, adding Business as a category if your criteria are met. How you get the values of the check boxes depends on whether the boxes are bound or unbound; see http://www.outlookcode.com/article.aspx?ID=38

--
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/article.aspx?id=54

"Scott07" wrote in message ...
Hi,

I'm attempting to create a custom contact form with 3 checkboxes that, when
checked, will add the form to a category (e.g. where Business, Competition,
Favorites, etc. are shown under "Available Categories"). For example, if the
checkboxes were named test1, test2, and test3; after those three were
checked, I'd like the form to be automatically classified under the
"Business" category.

Any help is appreciated.

Thanks.

  #3  
Old June 8th 07, 04:49 PM posted to microsoft.public.outlook.program_forms
Scott07
external usenet poster
 
Posts: 28
Default Custom Form - Checkboxes

I visited your link and noticed an article outlining how to use a checkbox to
show and hide a frame. I've removed the references to the frame since I
won't be needing that, but I don't know where to go with the Item_Write part
and how to make the act of checking the checkbox add it to the "Business"
category. This is for an unbound checkbox, by the way:

Sub CheckBox1_Click()
Set myinspector = Item.GetInspector
Set myPage1 = myInspector.ModifiedFormPages("Message")
Set Checkbox1 = myPage1.Controls("CheckBox1")
End Sub

Thanks.

"Sue Mosher [MVP-Outlook]" wrote:

You'll need to do this in code behind the form, in the Item_Write event handler, adding Business as a category if your criteria are met. How you get the values of the check boxes depends on whether the boxes are bound or unbound; see http://www.outlookcode.com/article.aspx?ID=38

--
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/article.aspx?id=54

"Scott07" wrote in message ...
Hi,

I'm attempting to create a custom contact form with 3 checkboxes that, when
checked, will add the form to a category (e.g. where Business, Competition,
Favorites, etc. are shown under "Available Categories"). For example, if the
checkboxes were named test1, test2, and test3; after those three were
checked, I'd like the form to be automatically classified under the
"Business" category.

Any help is appreciated.

Thanks.


  #4  
Old June 8th 07, 05:00 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Custom Form - Checkboxes

The sample you saw showed how to get the value of an unbound check box with its Value property. You need just three more pieces to write all the code. Use the code window's Script | Event Handler to insert the Item_Write event handler. In that procedure, you'll want to test the value returned by the check box, and if it's True, append to the item's Categories property:

If CheckBox1.Value = True Then
Item.Categories = Item.Categories & ",Business"
End If


--
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/article.aspx?id=54

"Scott07" wrote in message ...
I visited your link and noticed an article outlining how to use a checkbox to
show and hide a frame. I've removed the references to the frame since I
won't be needing that, but I don't know where to go with the Item_Write part
and how to make the act of checking the checkbox add it to the "Business"
category. This is for an unbound checkbox, by the way:

Sub CheckBox1_Click()
Set myinspector = Item.GetInspector
Set myPage1 = myInspector.ModifiedFormPages("Message")
Set Checkbox1 = myPage1.Controls("CheckBox1")
End Sub

Thanks.

"Sue Mosher [MVP-Outlook]" wrote:

You'll need to do this in code behind the form, in the Item_Write event handler, adding Business as a category if your criteria are met. How you get the values of the check boxes depends on whether the boxes are bound or unbound; see http://www.outlookcode.com/article.aspx?ID=38

"Scott07" wrote in message ...
Hi,

I'm attempting to create a custom contact form with 3 checkboxes that, when
checked, will add the form to a category (e.g. where Business, Competition,
Favorites, etc. are shown under "Available Categories"). For example, if the
checkboxes were named test1, test2, and test3; after those three were
checked, I'd like the form to be automatically classified under the
"Business" category.

Any help is appreciated.

Thanks.


  #5  
Old June 12th 07, 04:51 PM posted to microsoft.public.outlook.program_forms
Scott07
external usenet poster
 
Posts: 28
Default Custom Form - Checkboxes

So, something like this (could use some syntax help please):

Function Item_Write()
If CheckBox1.Value = True Then
Item.Categories = Item.Categories & ",Business"
End If
End Function

I realize you mentioned I needed this somewhere, but am not sure how to
integrate the code together:

Sub CheckBox1_Click()
Set myinspector = Item.GetInspector
Set myPage1 = myInspector.ModifiedFormPages("Message")
Set Checkbox1 = myPage1.Controls("CheckBox1")
End Sub

Thanks.
  #6  
Old June 12th 07, 06:10 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Custom Form - Checkboxes

The three statements in the second procedure are the ones you need to use to return the check box as an object. You need to do that before you can get its value. In other words, put those 3 statements before the first statement in Item_Write.
--
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/article.aspx?id=54

"Scott07" wrote in message ...
So, something like this (could use some syntax help please):

Function Item_Write()
If CheckBox1.Value = True Then
Item.Categories = Item.Categories & ",Business"
End If
End Function

I realize you mentioned I needed this somewhere, but am not sure how to
integrate the code together:

Sub CheckBox1_Click()
Set myinspector = Item.GetInspector
Set myPage1 = myInspector.ModifiedFormPages("Message")
Set Checkbox1 = myPage1.Controls("CheckBox1")
End Sub

Thanks.

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Item_Send: How to generate a non-custom form message from custom f supportusa Outlook - Using Forms 3 April 9th 07 10:37 PM
Checkboxes Vanishing Jim Erwin Outlook - General Queries 2 October 11th 06 06:24 PM
Emailing a contact vCard with custom form loses all custom info Kim Outlook - Using Contacts 7 April 27th 06 12:21 AM
Making a group of checkboxes exclusive RazzerFraz Outlook - Using Forms 1 February 20th 06 04:14 PM
Cannot programmatically open custom message in custom form ms Outlook - Using Forms 1 January 20th 06 03:01 PM


All times are GMT +1. The time now is 10:39 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.