View Single Post
  #2  
Old June 21st 07, 06:03 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default creating toolbar button to Mark As Read & Delete



For one in a folder selected email:

Dim Mail as Outlook.MailItem
Set Mail=Application.ActiveExplorer.Selection(1)
Mail.Unread=False
Mail.Save
Mail.Delete

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Organize Outlook email:
http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6

Am Wed, 20 Jun 2007 16:41:33 -0700 schrieb Andrea:

I'm a VBA beginner. I tried to create a toolbar button that marks mail as
read & deletes it, and already I'm beyond my meager skills. I can create

the
button & assign a macro to it, but I can't write the macro code!

So what's the code that will make a button mark mail as read and then

delete
it?

Thanks very much,
Andrea

Ads