View Single Post
  #2  
Old December 22nd 09, 03:29 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Making custom Outlook 2007 folders emptiable like "Deleted Items"

Use the Application.FolderContextMenuDisplay() event. You will need to add a
CommandBarButton object to the CommandBar passed to you in that event
handler, so you will need to add a new menu entry when the event fires.

Your code then will have to iterate the folder's contents and delete
everything in the folder, then it will need to delete everything moved from
the folder to the Deleted Items folder.

There is no "emptiable" property as you seem to think.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"JoeBrind17" wrote in message
...
I want to create a "MyDumpster" subfolder under "Inbox" and have it offer
the
"Empty 'MyDumpster' Folder" option in the context menu appearing when I
right-click it in the Navigation pane. I do not want to write a "Delete
Folder" macro and bind it to a new menu button. Instead, I want the new
folder to possess something akin to an "Emptiable" property similarly to
the
"Deleted Items" folder. How do I do this, please?


Ads