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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting journal entries 1

Status
Not open for further replies.

samsunguser

Technical User
Feb 10, 2004
28
GB
Trying to delete 13,000 journal entries but keeps telling me that unable to because of lack of memory. I'm having to delete in small sections which will take me an age. Is there any other way|? ps..will deleting these entries delete the original file???
 
Hello samsunguser,

Can try to delete journal entries by automation. But, you have to make up a set of criteria you want those journal entries to meet to be deleted.

Let's say you want to delete those items with subject "Meeting Request" and start on or earlier than 2004/4/30 then the following vbscript (.vbs) will do so.
Code:
const olFolderJournal=11

startlimit=#2004/4/30#
typecat="Meeting Request"

set ool=createobject("outlook.application")
set omapi=ool.getnamespace("mapi")
set ojournal=omapi.getdefaultfolder(olFolderJournal)
for each oitem in ojournal.items
    if strcomp(oitem.type, typecat,1)=0 and _
        (oitem.start<=typecat) then
        oitem.delete
    end if
next
set ojournal=nothing : set omapi=nothing : set ool=nothing
Just double click of the .vbs to get start.

regards - tsuji
 
Does this need to be installed on the client machine or on the exchange 5.5 server?

Thanks

 
Hello ASabir,

You run it as a standalone .vbs file. To succeed, you've to have the necessary permission.

regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top