Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom Outlook Form - Checkboxes Determine Recipients

Status
Not open for further replies.

danmeljeff

Technical User
Oct 4, 2006
15
0
0
US
Hi All,

I'm trying to figure out how to use the click event, so that when a checkbox is clicked, it'll add an email address to the recipient field of my message form.

I'm using Outlook 2003.

I would like to have 3 checkboxes, and each one will represent a department to email within my company. If the first checkbox is ticked, I'd like the corresponding email distribution list (the checkbox's caption) to be added to the recipient field. When unchecked, it'd be removed from the recipient field. I'd like this sort of functionality to work for all possible combinatin of checkboxes ticked. Another thing to consider is how to ensure the ";" is between each email distribution list if multiple checkboxes are ticked.

I've written some excel vba code, but am having difficulties with the outlook vba code.

Any help would be appreciated. And if you need further info, please let me know.

Thank you.
 
I think you would want to use the change event, not the click event.

The Recipients collection has .add and .remove methods.
 
I get stuck on how I need to reference the recipient field to add an address to it.

Would you happen to have an example?

Thanks
 


Item.Subject = "New Day Booking"

for the subject i do this, so i pesume there will be something like

Item.recipient = blah blah

Chance,

Filmmaker, gentleman and ROMAN!
 
sorry it would be Item.recipient.add "blah blah"



Chance,

Filmmaker, gentleman and ROMAN!
 
Wow...that seems quite easy.

I've got to get my head around thinking vba vs dba, so yes, collection and not field :)

Thanks everyone.
 
You could use:
Item.To = "address1,address2,etc"
Item.CC = "more recipeints"
Item.bcc ="If required"
Item.recipients.Resolve

also if this is an Outlook custom mail item as opposed to a user form, then you'll be using VBS and not VBA


Everybody body is somebodys Nutter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top