Setting or adding data to a form field

M

Mark Masters

Hi,

I'd like to set the TO field to fixed, non-editable destinations that will need
to be updated from time to time. It will be a read-only field to the form user.

CC on the other hand needs to be preset, but allow the user to add to it, but
ideal, not remove any of the preset CC values.

I've been skimming around ch. 15-19 of the excellent book "Microsoft Outlook
Programming: Jumpstart for Administrators, Developers, and Power Users" and
figured out that I can set the value "formula" to the string that I want in
double quotes like, "John Doe". I need the SUBJECT to be fixed and
unchangeable, unless they later want to edit the form.

I can set the TO field and make it read only. However I can use the CC button
to update the CC field AND to add or change the TO field which I want fixed.

Is there a better way to set the values of these fields and restrict the ones
that I don't want to change?

I had also thought of splitting the CC field so a label shows the fixed
addresses that are then always added to whatever's in the CC field, if I can
figure out how to do that. LOL.

Thanks,
Mark
 
S

Sue Mosher [MVP-Outlook]

Code behind the custom form -- to work with the Recipients collection -- would be appropriate only if you're planning to publish it and send only to internal recipients. Tell us more about how this form will be used.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

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

Mark Masters

Code behind the custom form -- to work with the Recipients collection --
would be appropriate only if you're planning to publish it and send only
to internal recipients. Tell us more about how this form will be used.

Yes it will be published for internal use only. Most are service requests. Some
would be form to tell HR to start the process of getting a new hire into the
system, requesting email and network access, etc. Pretty much a fill in the
blanks deal,and email internally, with no long term data archiving.
 
S

Sue Mosher [MVP-Outlook]

There's really no such thing as a read-only To or Cc field because the user can display the Address book to set either one. Therefore, I'd suggest that you go ahead and show the preset To recipients with a custom text field that has a formula set to [To], using a read-only text box control, or remove the To controls completely. Leave the Cc field available. Then in the Item_Send event handler, iterate the Recipients collection and make sure that all the required To and Cc recipients are still there, adding any that the user might have removed. I like your idea of using a label to show which recipients have to be included. You can use the data in the label to help with the validation in Item_Send.
--
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