![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |