09-25-2008, 02:32 PM
Hi,
try this,
try this,
Code:
Public Function SendMail(SendTo, Subject, Body,Attachment)
Set ol = CreateObject("Outlook.Application")
Set Mail = ol.CreateItem(0)
Mail.to = SendTo
Mail.Subject = Subject
Mail.Body = Body
If(Attachment <> "") Then
Mail.Attachments.Add(Attachment)
End IF
Mail.Send
Set Mail = nothing
Set ol = nothing
End Function