Show AllShow All

Type Property

ShowType property as it applies to the Attachment object.

ShowType property as it applies to the Link or Conflict object.

ShowType property as it applies to the ItemProperty and UserProperty objects.

ShowType property as it applies to the Recipient object.

ShowType property as it applies to the AddressEntry and JournalItem objects.

ShowType property as it applies to the NameSpace object.

Example

This Visual Basic for Applications (VBA) example uses CreateItem to create an appointment and uses MeetingStatus to set the meeting status to "Meeting" to turn it into a meeting request with both a required and an optional attendee. The recipient names should be replaced with valid names to avoid errors.

Sub ScheduleMeeting()
	Dim myOlApp As Outlook.Application
	Dim myItem as Outlook.AppointmentItem
	Dim myRequiredAttendee As Outlook.Recipient
	Dim myOptionalAttendee As Outlook.Recipient
	Dim myResourceAttendee As Outlook.Recipient
	Set myOlApp = CreateObject("Outlook.Application")
	Set myItem = myOlApp.CreateItem(olAppointmentItem)
	myItem.MeetingStatus = olMeeting
	myItem.Subject = "Strategy Meeting"
	myItem.Location = "Conference Room B"
	myItem.Start = #9/24/2003 1:30:00 PM#
	myItem.Duration = 90
	Set myRequiredAttendee = myItem.Recipients.Add ("Nate Sun")
	myRequiredAttendee.Type = olRequired
	Set myOptionalAttendee = myItem.Recipients.Add ("Kevin Kennedy")
	myOptionalAttendee.Type = olOptional
	Set myResourceAttendee = myItem.Recipients.Add("Conference Room B")
	myResourceAttendee.Type = olResource
	myItem.Send
End Sub
		

If you use Microsoft Visual Basic Scripting Edition (VBScript) in a Microsoft Outlook form, you do not create the Application object, and you cannot use named constants. This example shows how to perform the same task using VBScript code.

Sub CommandButton1_Click()
 Set myItem = Application.CreateItem(1)
 myItem.MeetingStatus = 1
 myItem.Subject = "Strategy Meeting"
 myItem.Location = "Conference Room B"
 myItem.Start = #9/24/03 1:30:00 PM#
 myItem.Duration = 90
 Set myRequiredAttendee = myItem.Recipients.Add ("Nate Sun")
 myRequiredAttendee.Type = 1
 Set myOptionalAttendee = myItem.Recipients.Add ("Kevin Kennedy")
 myOptionalAttendee.Type = 2
 Set myResourceAttendee = myItem.Recipients.Add("Conference Room B")
 myResourceAttendee.Type = 3
 myItem.Send
End Sub