Delete folder without moving to "deleted items" folder

  • Thread starter Thread starter Simon Minder
  • Start date Start date
S

Simon Minder

Dear all,

In Outlook I have VBA code which copies the contact folder stored in our
Public Folders to my contact folder as a new subfolder.

E.g. name of the contact folder in the public folders > PContacts

My contact folder will look like this after the copy process:

Mailbox - Simon Minder
Inbox
Calendar
Contacts
PContacts
....

I would like to include code which deletes the PContacts folder without
moving the folder to the "deleted items" folder. In addition, I assume I need
to clear the "Clear Offline Items" first, before I can delete this folder
(folder properties > General tab > Clear Offline Items).

Any thoughts, how I could achive the permanent deletion of PContacts folder
from my contacts, before I copy them from my public contacts again?

Best wishes,

Simon Minder
 
There is no "hard delete" option when deleting something with the Outlook
object model. You would have to use a different, lower level API to bypass
the Deleted Items folder. You can use CDO 1.21 (optional installation or
download), Redemption (www.dimastr.com/redemption) or Extended MAPI (C++ or
Delphi code only) for something like that.
 
Back
Top