Scripting in the Enhanced LitCrit Form
You can use script to customize the LitCrit Outlook form. The enhanced version of the LitCrit form defines and executes Visual Basic Scripting Edition (VBScript) code when the user completes the following actions:
- Opens the form. Script that runs when the LitCrit form opens selects the graphic that appears in the imgMedia image control. When you open an existing critique the appropriate graphic appears for the media type of the reviewed item. The layoutflags property for the message and the txtMessage text box are also set when you first open the form. Setting this property to a value (68) that supports vertical and horizontal resizing allows you to resize the form and the text box. LitCrit Outlook Form Scripts contains this code. Individual controls on the form can also be automatically resized with the form by selecting the Resize with form property for the control.
- Changes custom properties. Script runs when the user or script changes a property on a custom field (a field you define for the form). For example, a script that runs when information in the Item Title custom field is changed concatenates the words "Critique of: " and the content of the Item Title field. LitCrit Outlook Form Scripts contains this code.
- Changes standard properties. Script runs when the user or script changes a property on a standard field (the fields that are available from forms that ship with Microsoft Outlook). For example, when you type information in the txtCritique text box control, the subject field (a standard field associated with txtCritique) is examined and the switch that controls the automatic insertion of text in the txtCritique text box is set. LitCrit Outlook Form Scripts contains this code.