Check Box on Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a check box on my custom form and I want it to populate the "To" Field
with the corresponding email group when it is check...any ideas to generate
this?
 
I have a check box on my custom form and I want it to populate the "To" Field
with the corresponding email group when it is check...any ideas to generate
this?
Go to www.outlook-code.com and search for a code example that adds a recipient
object to the mail item.
 
Key questions:

1) Can the message have more than one To recipient?
2) Is the check box bound to an Outlook property?

In the meantime, see http://www.outlookcode.com/d/propsyntax.htm

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Since you can have other To recipients besides the one the check box adds, you'll probably find it easiest to handle this in the Item_Send event handler. Note the syntax for referring to a control using the page and control names:

Function Item_Send()
Set myPage = Item.GetInspector.ModifiedFormPages("Name of your customized page")
Set CheckBox1 = myPage.Controls("CheckBox1")
If CheckBox1.Value = True Then
Set recip = Item.Recipients.Add "name_of_recipient"
recip.Resolve
End If
End Function
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top