More Outlook Resource Sites

Microsoft Developer Network (MSDN)

FAQs and other general resources

share code 22-Aug-2017 17:07

Looking for help with Outlook programming projects — VSTO, add-ins, VBA, custom Outlook forms, etc.? You′ve come to the right place!

NEW! >> Subscribe to this site via RSS. For more RSS options, see the complete list of feeds on our main news page.

Code level: advanced    Code area: Outlook Form Design Printer Friendly Version
Title: How to make a checkbox show and hide a frame
Description: First this is for unbound checkboxes and you use nameofcheckbox_click() sub routine. Set the item get inspector and the checkbox and frame. Then make them = each other.
Date: 22-Jun-2005  23:37
Code level: advanced
Code area: Outlook Form Design
Posted by: Sabella Falls
This message is displayed as VB.NET
 Sub CheckBox1_Click()
    Set myinspector = Item.GetInspector
    Set myPage1 = myInspector.ModifiedFormPages("Message")
    Set frame3 = myPage1.Controls("frame3")
    Set Checkbox1 = myPage1.Controls("CheckBox1")
    frame3.Visible = Checkbox1.Value
End Sub
All 57comments
Page [ 1 2 3 4 5 6 Next >>  
  12-Oct-2005  08:02   
How do you do this code for a bound checkbox? I am wanting to hide some frames but would like this to work once they have been sent and opened too.

Thanks
  13-Oct-2005  09:46   
You would use the PropertyChange or CustomPropertyChange event to replace the Click event handler (see http://www.outlookcode.com/d/propsyntax.htm ), and also include code in the Item_Open event handler to adjust the UI when the recipient opens the item.
  03-Apr-2006  18:07   
I'm having problems with my checkboxes. I want to check them and have them stay checked once they are sent ( I want the recipient to view the boxes checked)
  07-Apr-2006  15:49   
Astoria, then you need to bind each check box to an Outlook Yes/No property. Do this at the top of the Value tab on the Properties dialog for the control, creating new properties as needed.
  21-Apr-2006  14:40   
I have a bound checkbox bound to a text box within a frame. What I would like to do is set a code that when the checkbox is selected the text box which is hidden will be visible and a message box prompts..."please enter account number"...
Thank you
  01-May-2006  14:11   
Jacqueline, for a bound check box, you'll need to use the CustomPropertyChange event, as shown on the page I suggested.
  10-May-2006  21:41   
The buttons within the form I have created only works when I run in designing and when it is published. For some reason they do not work when I save the outlook form on my desktop for example. All other funstions of the form work correctly when it is saved on the destop apart from the buttons. Can some one help??? Code below...

Sub Bob_Click()
    Set Value = Item.UserProperties("CC")
    Item.UserProperties("CC").Value = "; bob@hotmail.com;"
End Sub
 
  15-May-2006  07:21   
Saylesh, code only runs in published forms not saved .oft form templates; see http://www.outlookcode.com/d/secforms.htm
  06-Oct-2006  10:13   
What do I need to do to ensure when a check box is checked by the sender, so it shows as checked when it is viewed by the recipient?
  06-Oct-2006  21:15   
Todd, you would need to bind the check box to an Outlook property and, on the read layout for the form, show a check box control bound to the same property.
Page [ 1 2 3 4 5 6 Next >>