That would be:
Public Sub SendSelectedMail()
Dim Sel As Outlook.Selection
Dim obj As Object
Dim i&
Set Sel = Application.ActiveExplorer.Selection
For i=1 to Sel.Count
Set obj = Sel(i)
If TypeOf obj Is Outlook.MailItem Then
obj.Send
End If
Next
End Sub
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Organize eMails:
<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>
Am Fri, 06 Jul 2007 01:27:54 -0700 schrieb Lewis:
> Hello Michael,
>
> Thanks for that it works brilliantly. However, it will only send one
> email per click of the macro button, is there a way to tweak the code
> to send multiple items once highlighted.
> Thank you.
>
> Lewis
>
> On 6 Jul, 07:43, "Michael Bauer [MVP - Outlook]" <m...@mvps.org>
> wrote:
>> You might do that with a few lines of VBA:
>>
>> Public Sub SendSelectedMail()
>> Dim Sel As Outlook.Selection
>> Dim obj As Object
>>
>> Set Sel = Application.ActiveExplorer.Selection
>> If Sel.Count Then
>> Set obj = Sel(1)
>> If TypeOf obj Is Outlook.MailItem Then
>> obj.Send
>> End If
>> End If
>> End Sub
>>
>> By customizing your commandbar you can add a button to start that macro:
>> right click on a commandbar, Customize/Commands/Macros, drag the macro's
>> name onto the bar. With another right click on the new button you might
also
>> change its face.
>>
>> --
>> Viele Gruesse / Best regards
>> Michael Bauer - MVP Outlook
>> Organize eMails:
>> <http://www.vboffice.net/product.html...063&cmd=detail =en&pub=6>
>>
>> Am Thu, 05 Jul 2007 08:41:44 -0700 schrieb Lewis:
>>
>>> Hi
>>
>>> Is there a way of automatically sending emails from an outlook drafts
>>> box without going into each mail and clicking "send".
>>
>>> Thanks for any help
>>
>>> Lewis