Search notes:

Outlook Object Model: Table

A table object represents a read-only and dynamic rowset of data in a folder or search object.
Each row in a table object corresponds to an item in folder, each column to a property of these items.

Methods and properties

application
class
columns
endOfTable If false, more rows can be obtained with getNextRow().
findNextRow() Finds the next row that meets the criteria that were specified with findRow()
findRow() Applies a filter and returns the first row that meets this filter's criteria. The next rows that meet this criteria are found using findNextRow().
getArray() Returns a two-dimensional array that corresponds to the table's rows and columns.
getNextRow() Moves to the next row in the table if endOfTable is not true.
getRowCount() Counts the rows in the table
moveToStart()
parent
restrict()
session
sort()

Iterating over a table

option explicit

sub main() ' {

    dim fld as folder
    set fld = session.getDefaultFolder(olFolderInbox)

    dim tbl as table
    set tbl = fld.getTable("[subject] = 'Abschied'")

    tbl.sort("receivedTime")

    while not tbl.endOfTable

       dim r as row
       set r = tbl.getNextRow()

       dim entryId as string
       entryId = r.item("entryId")

       dim msg as mailItem
       set msg = session.getItemFromId(entryId)

       debug.print  entryId & ": " & r.item("LastModificationTime") & " - " & r.item("Subject") & " (" & msg.sender & ")"

    wend

end sub ' }
Github repository about-MS-Office-object-model, path: /Outlook/Table/iterate.vb

Index