Table Object
Outlook Developer Reference |
Represents a set of item data from a Folder or Search object, with items as rows of the table and properties as columns of the table.
Version Information
Version Added: Outlook 2007
Remarks
The Table represents a read-only dynamic rowset of data in a Folder or Search object. You can use Folder.GetTable or Search.GetTable to obtain a Table object that represents a set of items in a folder or search folder. If the Table object is obtained from Folder.GetTable, you can further specify a filter (in Table.Restrict) to obtain a subset of the items in the folder. If you do not specify any filter, you will obtain all the items in the folder.
By default, each item in the returned Table contains only a default subset of its properties. You can regard each row of a Table as an item in the folder, each column as a property of the item, and the Table as an in-memory lightweight rowset that allows fast enumeration and filtering of items in the folder. Although additions and deletions of the underlying folder are reflected by the rows in the Table, the Table does not support any events for adding, changing, and removing of rows. If you require a writeable object from the Table row, obtain the Entry ID for that row from the default EntryID column in the Table and then use the GetItemFromID method of the NameSpace object to obtain a full item, such as a MailItem or ContactItem, that supports read-write operations. For more information on default columns in a Table, see Default Properties Displayed in a Table Object.
For more information on the Table object, see Enumerating, Searching, and Filtering Items in a Folder.
Example
The following code sample illustrates how the Table object can return a filtered set of items based on their LastModificationTime property. It also shows how to list the default properties as well as specific properties of the items.
Visual Basic for Applications |
---|
|
See Also
- Outlook Object Model Reference
- Table Object Members
- How to: Access the Values of a Multi-valued Property in a Table
- How to: Filter the Body of a Mail Item
- How to: Search the Inbox for Items with Subject Containing "Office"
- How to: Use the Table Object to Performantly Enumerate Filtered Items in a Folder