We are currently using a script to remove all documents in a view:
set notesviewentrycollection.allentries
notesviewentrycollection.removeall(true)
When these docs are deleted, they placed in the trash can. Can someone tell me how to get the Trash to be emptied?
TIA!
Laura
Subject: LotusScript needed to empty trash
OK, I really can’t help this . . .
Can you also write a script to have Lotusscript make me a sandwich and vacuum the upstairs?
Subject: LotusScript needed to empty trash
I believe you are going to have to take it a step further:
dim vCol as NotesViewEntryCollection
set vCol=view.allentries
dim entry as NotesEntry
set entry=vcol.GetFirstEntry
dim doc as NotesDocument
dim strDeleteType as string
'YOU MIGHT WANT TO DO THIS IF YOU WANT THE USER
’ TO HAVE A CHOICE
If db.GetOption(DBOPT_SOFTDELETE) Then
If Messagebox(“Do you want a hard deletion?”,_
MB_YESNO + MB_ICONQUESTION, "Hard or soft")
= IDYES Then
strDeleteType="soft"
else
strDeleteType="hard"
end if
else
strDeleteType=“hard”
end if
while not (entry is nothing)
Set doc = entry.document
if strDeleteType=“hard” then
Call doc.RemovePermanently(True)
Else
Call doc.Remove(True)
End If
set entry=vCol.GetNextEntry(entry)
wend
Subject: RE: LotusScript needed to empty trash
Thanks so much for your prompt response. We’ve been trying to rewrite our 90 day document purge routine for mail files and couldn’t figure out a way to keep documents from going to the trash when blowing away all docs in the custom view. Cycling through the docs will make it a little slower but if it removes the trash issue its our best solution. Thanks again!