Какой вид вы настраиваете в расширенном поиске? Также вы можете написать макросы VBA, чтобы извлекать элементы из папки «Входящие» и помещать их в таблицу. Многие из опций расширенного поиска не включены в объектную модель Outlook, поэтому это зависит от представления, которое вы пытаетесь настроить.
Так можете ли вы сказать мне, что вы делаете в расширенный поиск ..?
76mel
Хорошо, используя таблицы Outlook, вы можете поместить это в свой Excel как макрос
Используйте «sfilter», чтобы определить критерии расширенного поиска.
Вам нужно будет закачать данные в Excel внизу.
Sub GetMail()
Dim oApp As Outlook.Application
Dim oFolder As Outlook.Folder
Dim oNameSpace As Outlook.Namespace
Dim emailCount As Integer
Dim counter As Integer
Dim sfilter As String
Dim oRow As Outlook.Row
Dim oTable As Outlook.Table
Dim i As Outlook.MailItem
Set oApp = CreateObject("Outlook.Application")
Set oNameSpace = oApp.Session
Set oFolder = oNameSpace.GetDefaultFolder(olFolderInbox)
'Add what ever filter you want here using DASL
sfilter = "[LastModificationTime] > '5/1/2005'"
'Restrict with Filter
Set oTable = oFolder.GetTable(sfilter)
'Remove all columns in the default column set
oTable.Columns.RemoveAll
'Specify desired properties
With oTable.Columns
.Add ("EntryID")
.Add ("Subject")
.Add ("ReceivedTime")
End With
'Enumerate the table using test for EndOfTable
'Pump it into your worksheet
Do Until (oTable.EndOfTable)
Set oRow = oTable.GetNextRow()
Debug.Print (oRow("EntryID"))
Debug.Print (oRow("Subject"))
Debug.Print (oRow("ReceivedTime"))
Loop
'Clean up
Set oTable = Nothing
Set oFolder = Nothing
Set oNameSpace = Nothing
Set oApp = Nothing
End Sub