Delete Calendar Item Bypassing Deleted Items folder

Status
Not open for further replies.
Outlook version
Outlook 2010 64 bit
Email Account
Office 365 Exchange
Greetings!

I'm still working out the kinks in my macro. Here's my latest issue. I was finding that after a short time, I couldn't delete the "Print" calendar folder.

After a lot of investigation I discovered that it is because the previous deletion had left the folder and its items in the Deleted Items folder.

My current code is:

Set objCalendar = Session.GetDefaultFolder(olFolderCalendar)
Set printCal = objCalendar.Folders("Print")
printCal.Delete

Can you suggest a way to by-pass the deleted items folder so that it will delete correctly next time?

Best,

Jeanne ("Always Grateful") Goodman
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
i think it allows like 10 copies of the print calendar, then you need to empty deleted items.


Try something like this after deleting Print
Dim oDeletedItems As Outlook.Folder
Dim oFolders As Outlook.folders

Set oDeletedItems = Application.Session.GetDefaultFolder(olFolderDeletedItems)
Set oFolders = oDeletedItems.Folders
oFolders.Item("Print").Delete


if that doesn't work, use this to delete all folders
Dim oDeletedItems As Outlook.Folder
Dim oFolders As Outlook.folders

Set oDeletedItems = Application.Session.GetDefaultFolder(olFolderDeletedItems)
Set oFolders = oDeletedItems.Folders
For i = oFolders.Count To 1 Step -1
oFolders.Item(i).Delete
Next


ETA the dim statements
 
Last edited:
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
S Can't delete corrupt calendar item - not showing up in MDBVU32 Using Outlook 1
H Delete Calendar Entries in Using Outlook 2
I Outlook 2013 How do I delete a Calendar? Using Outlook.com accounts in Outlook 1
C Delete Subject-Add Organizer to all Reservations in Default Calendar. Using Outlook 0
B Outlook 2016: Can't delete default calendar but I don't use it Using Outlook 7
M Can't Delete iCloud Calendar Notifications From Outlook 2016 Using Outlook 0
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
G Outlook calendar entry corrupted. Constant pop up when you open outlook. Unable to delete or remove. Using Outlook 2
E Help with macro to answer and delete calendar requests? Outlook VBA and Custom Forms 5
D Restore Delete Calendar Meeting Request Using Outlook 3
E Want Outlook to delete tenative calendar entries when invite is deleted Using Outlook 3
A Delete all appointments on calendar for week of holiday / annual leave Using Outlook 1
N Can't delete calendar entries on shared calendar Using Outlook 3
C Delete Calendar Using Outlook 0
J Delete meetings in calendar without cancelling the meeting Using Outlook 1
C Outlook 2007 locks up every time I delete calendar reminder Using Outlook 1
J I cannot delete the same three Calendar Reminders every time Outlook opens Using Outlook 1
Y OL2010 32-bit with Outlook Connector: how do I delete the calendar in the .pst? Using Outlook 2
G How can I delete a private appointment in shared calendar in public folders? Using Outlook 1
C Cannot delete Outlook 2010 calendar items on shared calendars. Using Outlook 3
I Two email accounts, want one consolidated calendar, can't delete second calendar and two reminders p Using Outlook 1
R Notes lost after delete of calendar entry Using Outlook 2
D How can I delete "extra" folders for Contacts, Calendar, Notes and Tasks in Outlook 2010? Using Outlook 2
T How to easily delete a large number of Outlook calendar appointments? Using Outlook 1
N Outlook Calendar--don't delete when date is passed Using Outlook 2
T Outlook 2007 *opens* calendar entry when told to delete it Using Outlook 2
A Delete a year's worth of events in calendar Using Outlook 1
D Outlook 2007 - Cannot Delete People's Shared Calendar Using Outlook 1
J Unable to dismiss or delete an Outlook calendar reminder. Using Outlook 3
J Moved many emails to Outlook external folder, need to delete on Gmail server Using Outlook 13
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
9 Outlook 2016 How to save an Outlook attachment to a specific folder then delete the email it came from? Using Outlook 1
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
D Delete Emails from Senders in Shared Mailbox Outlook VBA and Custom Forms 1
R How to delete Facebook Contacts folder in Outlook 365 Using Outlook 7
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
Z Can't delete IMAP folder Using Outlook 2
J Delete old emails Exchange Server Administration 1
Similar threads


















































Top