Create an Outlook Item

This procedure uses the Click event to call CreateItem to create and show an appointment when a user clicks CommandButton1. The example shows how to do this in a custom form page using VBScript.

In design mode:

  1. Using the Control Toolbox, place a CommandButton on your form.

  2. Open the Script Editor. How?

  3. Enter the following code, using the appropriate constant value from the OlItemType enumeration to specify the type of item that you want to create.

  Sub CommandButton1_Click 
 Application.CreateItem(1).Display 
End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.