Advanced Search in MS Outlook by VBA and SQL

Status
Not open for further replies.

Bamerand

Member
Outlook version
Outlook 2013 32 bit
Email Account
Exchange Server
Here is a code I was able to modify to meet my expection (got from www.slipstick.com). It loops thru entire Outlook and find (in different PST) emails received / sent within today. So far so good. Now, it also searches for and finds Outlook items such new contacts in "Recipient Cache", "Tasks", "Calendar" and "Sync Issues". Is there a way to add a line that will allow to skip the above mentioned "Recipient Cache", "Tasks", "Calendar" and "Sync Issues"? Filtering does not do good as the filter enableed search process slowes down the PC by almost 10 times, for with no filter applied the search takes no more that 15 seconds in total, meanwhile enabling filter in views makes the search more than 2.5-3 minutes. I am open to any suggestions.

Sub SentToday()
Dim myolApp As New Outlook.Application
Dim tDate As Date
On Error GoTo ErrHandler
tDate = Date 'Today
txtSearch = "sent: (=" & tDate & ")"
myolApp.ActiveExplorer.Search txtSearch, olSearchScopeAllOutlookItems
Set myolApp = Nothing
Exit Sub
ErrHandler:
MsgBox "Oops, an error has occured." & vbCrLf & vbCrLf & "Error Code : " & Err.Number & " , " & Err.Description
Call GoToMyInbox
End Sub
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
R Outlook for Mac - Advanced Search and Tracking Sent Emails Using Outlook 0
G Outlook 2007 Advanced Find unresponsive until end of search Using Outlook 2
W Getting to Advanced Search in Outlook 2010 for Contacts Using Outlook 1
J Outlook 2007 Advanced Find Will Not Search Additional Mailboxes Using Outlook 1
C Interaction between Advanced Find and Instant Search in Outlook 2007 Using Outlook 1
C Advanced search greyed out in Outlook 2007 Using Outlook 1
A Outlook 2003 / Advanced Find, how to set for search all subfolders ??? Using Outlook 3
J Outlook 2010: Advanced Find Contact Search Issue Using Outlook 7
A Outlook Advanced Search Problems...returns with an Error: Argument Outlook VBA and Custom Forms 1
T Outlook 2007 Indexing Options and Advanced Search options disabled Using Outlook 5
D Advanced Search Question Using Outlook 1
B Printing Advanced Search Output Screen Using Outlook 5
R No indication that Advanced Find is working under Search Tools. Using Outlook 2
L Cannot search for number with Advanced Find Using Outlook 2
P Open Advanced Search Dialog Outlook VBA and Custom Forms 1
L unblocking attachments before sending Office 365 Advanced Protection Using Outlook 0
N Disable Auto Read Receipts sent after using Advanced Find Using Outlook 4
H "Advanced find: column for full folder path? Using Outlook 1
skylark53 Advanced recurrence problem Using Outlook 2
Andrew Hawkins "Advanced Find" Using Outlook 1
A Advanced find query facilty Help please Using Outlook 2
P Outlook Advanced Find Using Outlook 0
S Advanced Find text field limits Using Outlook 2
C O2010: Using Advanced Find to locate exact queries Using Outlook 3
V Advanced Find - [Today]-3 ? Using Outlook 4
N Outlook 2010 crippled Advanced Find, now what? Using Outlook 3
H Outlook 2010 Advanced Find - Menu items missing Using Outlook 1
D Outlook 2010 - Advanced Find - No Status Bar = No Item Count Using Outlook 2
J How to filter by address fragment (e.g. "@domain.com") with advanced find? Using Outlook 2
N WINDOWNS LIVE SETTINGS / ADVANCED / REPLY E-MAIL (does not reply to email selected) Using Outlook 3
O Desktop Advanced Find Cannot Find Messages Sent via Blackberry - but they are synched and listed in Sent Folder Using Outlook 2
M Outlook 2010 and the add-in Advanced Folder Watch Using Outlook 2
L SIGNATURE Advanced Edit Editor Using Outlook 5
D Need to export contacts but the export/import option does not show in the advanced options tab as the HELP option says it will Using Outlook 4
M Outlook Options > Advanced shows error message: 'File Cannot Be found' Using Outlook 1
L Advanced DAG management documentation. Exchange Server Administration 1
C Outlook 2010 E-mail Signature Advanced edit Using Outlook 2
J Advanced RBAC - restricting delegate configuration Exchange Server Administration 1
B Email signature advanced edit question Using Outlook 2
J Can't print memo style from advanced find in Outlook 2007 Using Outlook 2
L How to customize the Advanced Find form Outlook VBA and Custom Forms 1
D Re: How to customize the Advanced Find form Outlook VBA and Custom Forms 1
J Advanced outlook trick: help needed! Outlook VBA and Custom Forms 3
S Programmatically bring up Advanced Find for contacts? Outlook VBA and Custom Forms 1
L New Location for the Search Bar Using Outlook 7
T How can you include Junk Email in Search Results like you can include Deleted Items? Using Outlook 3
J Outlook 2016 After a search in all mailboxes, where is each message that was found? Using Outlook 6
King Mustard Sort search groups by amount of items? Using Outlook 1
V Outlook 2016 will not move emails in search results Using Outlook 4
T Search for incoming e-mails for a specified time range Using Outlook 1
Similar threads


















































Top