Check Box on Form

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?
 
H

Hollis Paul [MVP - Outlook]

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.
 
S

Sue Mosher [MVP-Outlook]

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
 
S

Sue Mosher [MVP-Outlook]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top