![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I needed to see all messages in my "Sent" folder that were sent
between 6 AM and 9 AM, so I tried Advanced Search Advanced tab Define more criteria with Field: Sent Condition: between Value: 6 am and 9 am but it was not returning anything. A macro should be able to do it, but I have not had any luck getting it to work (or finding a decent example that will work in OL 2003). Can someone post a VBA macro to accomplish the above search or explain what is wrong with the code below? Any help would be much appreciated... thanks 'this example searches for any messages in Inbox with a subject of "Test" 'but returns 'Run-time error '91': 'Object variable or With block variable not set Sub TestOutlookSearch() Dim oApp As New Outlook.Application Dim oSearch As Outlook.Search Dim iItem As Integer Dim sResult As String oSearch = oApp.AdvancedSearch("Inbox", "urn:schemas:mailheader:subject = 'Test'", True, "") ' search string/ schema examples? Set oResults = oSearch.Results For iItem = 1 To oSearch.Results.Count sResult = sResult & oSearch.Results.Item(iItem).SenderName & vbCrLf ' what are the other Item properties? Next MsgBox (sResult) End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
can i change the default meeting time from 1/2 hour to 1 hour? | Sarah | Outlook - Calandaring | 2 | June 8th 07 02:43 AM |
DST: Outlook received mail 1-hour behind | [email protected] | Outlook - General Queries | 4 | March 20th 07 09:45 PM |
KB928388 DST patch and Outlook 2003 Calendars with one hour offset | Mike Dimyan | Outlook - Calandaring | 12 | February 25th 07 01:00 AM |
Outlook and 18 hour setting | dcs | Outlook - Calandaring | 1 | March 30th 06 04:02 PM |
change am-pm to 24 hour time in Outlook | [email protected] | Outlook - Calandaring | 3 | February 5th 06 12:40 AM |