Create an Outlook item

Microsoft Office Outlook 2003

This procedure uses the Click event to call CreateItem to create and show an appointment when a user clicks CommandButton1.

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 value from the table below to specify the type of item that you want to create.
    Sub CommandButton1_Click
        Application.CreateItem(1).Display
    End Sub
    				
Type of item Has the value
MailItem 0
AppointmentItem 1
ContactItem 2
TaskItem 3
JournalItem 4
NoteItem    5
PostItem 6
DistListItem 7