Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding Journal Entries by Date

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Does anyone know how to find journal entries in outlook by a specific date? The only way I can find what I'm looking for is by looping through every journal entry I have in outlook and checking the creation date which is very inefficient. What I have looks something like this:

Set objNs = Application.GetNamespace("MAPI")
Set objFolderJournal = objNs.GetDefaultFolder(olFolderJournal)


For i = 1 To objFolderJournal.Items.Count
Set JournalEntry = objFolderJournal.Items(i)

'MsgBox (JournalEntry.CreationTime)
'MsgBox (JournalEntry.Body)
Next i
 
From what I see, there is no better way of doing it, since Outlook isn't based on a client/server model. If you have several such queries to run in a given session, and many journal entries to search, it may be faster to copy them all into a temp table then run queries on that table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top