View Single Post
  #5  
Old October 11th 08, 03:08 AM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default How to Access the "To" Recipient field and update it in outloo

In that case, you'd use the Item.Recipients.Add method, which you can look up
in Outlook VBA Help, to add the address to the existing recipients.

To make it really elegant, you may also want to code the reverse process --
iterate the Recipients collection when the user unchecks the box and remove
the recipient with the particular address.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54




"Venkat M" wrote:

Thanks for the reply...
To be more clear, I am basically designing a form with some checkboxes
and some info like company name, product name etc.,....that will be sent
to different persons.
when user selects the checkbox corresponding to a particular product
then the Recipient control box,which would be besides the 'To' user
field, should automatically include the specific email address from
contacts rather than user clicking 'To' box and then selecting recipient
from the address book.
The recipient mail address has to change each time user clicks a
different checkbox....i need command for this to include inside:
Sub checkbox1_Click
???
????
End Sub
Sub checkbox2_Click
???
????
End Sub

I know that if its a simple user defined box, i can edit it using
something like: "
but we cannot do that for mail field as it is recipient type and not
text type. so i think there is different command for such mail fields!!

I am not trying to replace recipients, just updating it each time....
and actually after this is done, i will have to add another recipient
for one of the checkboxes...that is second step

I look forward for your suggestions.

Thank You very much for your time and help,
Venkat


*** Sent via Developersdex http://www.developersdex.com ***

Ads