Row Object
Outlook Developer Reference |
Represents a row of data in the Table object.
Version Information
Version Added: Outlook 2007
Remarks
A Table is composed of rows and columns. It represents a read-only dynamic rowset of data in a Folder or Search object. You can regard each row of a Table as an item in the folder, and each column as a property of the item. By default, the Table contains only a subset of properties for items in the folder. This makes the Table an in-memory lightweight rowset that supports fast enumeration and filtering of items in the folder.
If the Table object is obtained from Folder.GetTable, you can further specify a filter (in Table.Restrict) to obtain a more restricted set of rows in the Table.
You can use the Table methods: FindRow, FindNextRow, GetNextRow, and MoveToStart to obtain a specific row in a Table.
Use Row.GetValues to obtain an array of values that correspond to column values at that row in the Table.
Use the helper functions Row.BinaryToString, Row.LocalTimeToUTC, and Row.UTCToLocalTime to facilitate type conversion of column values at a specific row. For more information on property value representation in a Table, see Factors Affecting Property Value Representation in the Table and View Classes.
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.
Example
The following code sample illustrates how to obtain a Table object based on the LastModificationTime of items in the Inbox. It also shows how to customize columns in the Table, and how to enumerate and print the values of the corresponding properties of these items.
Visual Basic for Applications |
---|
|
See Also
- Outlook Object Model Reference
- Row 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