This documentation is archived and is not being maintained.

Type Property

Office 2003

OlAttachmentType can be one of these OlAttachmentType constants.
olByReference
olByValue
olEmbeddeditem
olOLE

expression.Type

expression    Required. An expression that returns an Attachment object.

OlObjectClass can be one of these OlObjectClass constants.
olAction
olActions
olAddressEntries
olAddressEntry
olAddressList
olAddressLists
olApplication
olAppointment
olAttachment
olAttachments
olConflict
olConflicts
olContact
olDistributionList
olDocument
olException
olExceptions
olExplorer
olExplorers
olFolder
olFolders
olFormDescription
olInspector
olInspectors
olItemProperties
olItemProperty
olItems
olJournal
olLink
olLinks
olMail
olMeetingCancellation
olMeetingRequest
olMeetingResponseNegative
olMeetingResponsePositive
olMeetingResponseTentative
olNamespace
olNote
olObjects
olOutlookBarGroup
olOutlookBarGroups
olOutlookBarPane
olOutlookBarShortcut
olOutlookBarShortcuts
olOutlookBarStorage
olPages
olPanes
olPost
olPropertyPages
olPropertyPageSite
olRecipient
olRecipients
olRecurrencePattern
olReminder
olReminders
olRemote
olReport
olResults
olSearch
olSelection
olSyncObject
olSyncObjects
olTask
olTaskRequest
olTaskRequestAccept
olTaskRequestDecline
olTaskRequestUpdate
olUserProperties
olUserProperty
olView
olViews

expression.Type

expression    Required. An expression that returns a Link or Conflict object.

OlUserPropertyType can be one of these OlUserPropertyType constants.
olCombination
olCurrency
olDateTime
olDuration
olFormula
olKeywords
olNumber
olOutlookInternal
olPercent
olText
olYesNo

expression.Type

expression    Required. An expression that returns one of the above objects.

Depending on the type of recipient, returns or sets a Long corresponding to the numeric equivalent of one of the following constants:

  • JournalItem recipient: the OlJournalRecipientType constant olAssociatedContact.

  • MailItem recipient: one of the following OlMailRecipientType constants: olBCC, olCC, olOriginator, or olTo.

  • MeetingItem recipient: one of the following OlMeetingRecipientType constants: olOptional, olOrganizer, olRequired, or olResource.

  • TaskItem recipient: either of the following OlTaskRecipientType constants: olFinalStatus, or olUpdate.

This property is read/write.

expression.Type

expression    Required. An expression that returns a Recipient object.

Returns or sets a String representing the type of entry for this address such as an Internet Address, MacMail Address, or Microsoft Mail Address (for the AddressEntry object), or a free-form String field, usually containing the display name of the journalizing application (for example, "MSWord") (for the JournalItem object). Read/write.

expression.Type

expression    Required. An expression that returns one of the above objects.

Returns a String indicating the type of the specified object. The only supported string is "MAPI." Read-only.

expression.Type

expression    Required. An expression that returns a 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
		




Show: