VBA Code
objNamespace.GetDefaultFolder(Outlook.olDefaultFolders.olFolderInbox)
For Each objObject In objFolder.Items
Session
CDO Session
This is the CDO root object
Session.Logon
Session.Logoff
Session.GetMessage
Explorer Object
This is the window where the folders content are displayed
Me.ActiveExplorer.CurrentFolder.Name
Me.ActiveExplorer
Explorer.CurrentView
Explorer.Selection.Count
Inspector Object
This is the window where an Outlook item is displayed
Me.Inspectors
Namespace Object
The Session property returns a Namespace object that enables you to access the underlying Outlook data store and give you access to the default folders.
You can access the Namespace object by using the Application's Session property
Dim objInbox As Outlook.MAPIFolder
objInbox = Me.Session.GetDefaultFolder(olDefaultFolders.olFolderInbox)
Dim objNamespace As Outlook.Namespace
Dim objInbox As Outlook.MAPIFolder
objNamespace = Application.Session
objInbox = Me.Session.GetDefaultFolder(olDefaultFolders.olFolderInbox)
Outlook Folders
Folder | Items Folder Contents | Enumeration | |
Calendar | AppointmentItem | olDefaultFolders.olFolderCalendar | |
MeetingItem | |||
Contacts | ContactItem | olDefaultFolders.olFolderContacts | |
DisListItem | |||
DeletedItems | Any | olDefaultFolders.olFolderDeletedItems | |
Drafts | MailItem | olDefaultFolders.olFolderDrafts | |
InBox | MailItem | olDefaultFolders.olFolderInbox | |
DocumentItem | |||
TaskRequestItem | |||
TaskRequestUpdateItem | |||
Journal | JournalItem | olDefaultFolders.olFolderJournal | |
Junk E-mail | MailItem | olDefaultFolders.olFolderJunk | |
Notes | NoteItem | olDefaultFolders.olFolderNotes | |
Outbox | MailItem | olDefaultFolders.olFolderOutbox | |
Sent Items | MailItem | olDefaultFolders.olFolderSentMail | |
DocumentItem | |||
TaskRequestAcceptItem | |||
TaskRequestDeclineItem | |||
Tasks | TaskItem | olDefaultFolders.olFolderTasks | |
Public Folders | PostItem |
Outlook Items - 16
Items are contained in folders
An Items collections can contain multiple types of objects
This collection always returns an Object so you must cast it to the correct Outlook item.
Item | Description | Enumeration | |
AppointmentItem | A meeting or appointment in the Calendar folder | ||
ContactItem | A contact containing information about a person in the Contacts folder | ||
DisListItem | A distribution list containing several contacts in the Contacts folders | ||
JournalItem | A journal entry in the Journal folder | ||
MailItem | An e-mail message in the Inbox, Outbox or SentItems folder | ||
MeetingItem | An item in the InBox folder that contains information about a scheduled meeting to be added to the Calendar folder. An AppointmentItem becomes a MeetingItem when received in the InBox. | ||
NoteItem | A note in the Notes folder | ||
PostItem | A post in the public folder or a mail folder | ||
RemoteItem | A remote item in the InBox: similar to a MailItem but contains a subset of the information. Eg Only 256 characters of a message body are available before the message is downloaded. | ||
ReportItem | A report in the InBox: similar to a MailItem but also contains a report. These items are generated automatically when an error occurs. | Outlook.ReportItem | |
TaskItem | A task in the Task folder: the task can be created by the owner or assigned by another person | olItemType.olTaskItem | |
TaskRequestAcceptItem | A response in the InBox that accepts a task request | Outlook.TaskRequestAceptItem | |
TaskRequestDeclineItem | A response in the InBox that declines a task request | Outlook.TaskRequestDeclineItem | |
TaskRequestItem | An object that represents a task that has been assigned | Outlook.TaskRequestItem | |
TaskRequestUpdateItem | An object tha represents an update of information for a task that has been previously assigned. | Outlook.TaskRequestUpdateItem |
© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrev