Delete folder without moving to "deleted items" folder

Status
Not open for further replies.
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.

"Simon Minder" <Simon Minder> wrote in message

news:CE859D0E-6A20-407E-883F-5529273F2635@microsoft.com...
> 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
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
G Automatically delete messages in the synchronization folder Outlook VBA and Custom Forms 1
Z Outlook 365 delete reminder you can’t make change to contents of this-read only folder Using Outlook 4
J Moved many emails to Outlook external folder, need to delete on Gmail server Using Outlook 14
9 Outlook 2016 How to save an Outlook attachment to a specific folder then delete the email it came from? Using Outlook 1
R How to delete Facebook Contacts folder in Outlook 365 Using Outlook 7
Z Can't delete IMAP folder Using Outlook 2
N How to delete default folder "Contacts" (olFolderContacts) in a .pst file Using Outlook 8
Jeanne Goodman Delete Calendar Item Bypassing Deleted Items folder Outlook VBA and Custom Forms 2
K Deleted calendar and contact items not going to delete folder Using Outlook 1
K Outlook 2013 Deleted calendar and contact items not going to delete folder Exchange Server Administration 1
K check for sender, follow to my personal adress and delete the sent folder. Outlook VBA and Custom Forms 1
M Cannot delete spurious folder Using Outlook 7
O Your IMAP server wants to alert you to the following: Cannot delete folder with subfolders. Using Outlook 4
Emerogork How do I remove "Delete Folder" from the right-click menu? Using Outlook 1
E delete journal folder Using Outlook 2
Wotme Cant delete a task in task folder Using Outlook 2
F VB Script to Delete all contacts under local contacts folder Outlook VBA and Custom Forms 3
V Unable to delete from deleted items folder due to error message Using Outlook 3
A rule to move emails to a folder then want to delete them from that folder 2010 Using Outlook 5
D Line through message instead of sending to Delete folder??? Using Outlook 3
V How to delete mails in deleted items folder by vba? Outlook VBA and Custom Forms 1
N How to add or delete items to Move dropdown Menu Using Outlook 0
O How to delete a forum post? Using Outlook 4
T Outlook 2010 Errore run-time -2147417851 (80010105) Metodo delete ContactItem non riuscito Outlook VBA and Custom Forms 0
C Outlook 2016 Unable to delete Gmail IMAP calendar Using Outlook 2
S Outlook 2016 dont delete inbox item Using Outlook 0
F Wishlist Outlook suddenly began synchronizing deleted items every time I delete a single email. Using Outlook 2
O Outlook 2010 Add delete button to the side of the message list Using Outlook 1
R Outlook 365 update sets delete from server flag Using Outlook 2
S Outlook 2016 A Shortcut to recall and delete and sent message. Using Outlook 1
T Outlook 2010 How to Delete “Orphaned” TO DO? ( Not on Exchange Server) Using Outlook 6
P How did hacker cause link to delete and archive containing email? Using Outlook 6
J To delete the draft email Using Outlook 2
W Recurrence: delete older occurrences / change earliest start time Outlook VBA and Custom Forms 0
A Attachments.Delete Outlook VBA and Custom Forms 3
R Help Revising VBA macro to delete email over different time span Outlook VBA and Custom Forms 0
R Expand VBA Permanent Delete Code Outlook VBA and Custom Forms 6
M Delete headers in Inline reply Outlook VBA and Custom Forms 5
N VBA to delete duplicates by message-id on common pst for 2 or more emails Outlook VBA and Custom Forms 0
S How can I delete all copies of a given companies logo graphic from all my emails at once? Using Outlook 3
D after delete mail, open the next one Outlook VBA and Custom Forms 0
O Delete duplicate emails - subscription notifications Using Outlook 5
F Delete/create/reset Exchange mailbox on Outlook.com Using Outlook.com accounts in Outlook 3
L Email Read and Delete Outlook VBA and Custom Forms 4
H Delete Calendar Entries in Using Outlook 2
D Delete Emails from Senders in Shared Mailbox Outlook VBA and Custom Forms 1
R VBA Code to permanently delete selected email Outlook VBA and Custom Forms 10
JoeG Appointment Delete/Change Recurrence Outlook VBA and Custom Forms 0
C Outlook 2016 cannot delete, email showing in root Exchange Server Administration 5
C How to replace or delete first instance of sentence in mail body? Outlook VBA and Custom Forms 1

Similar threads

Top