Delete folder without moving to "deleted items" folder

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
 
K

Ken Slovak - [MVP - Outlook]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top