منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : كود لإرسال ايميل +Attachment عن طريق Microsoft Outlook 2003-2007
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
كاتب الموضوع : Norhan Adel

Declaration

كود :
' No special decelerations
' Just make sure that Microsoft Outlook 2000 or 2003 is installed.
' Outlook Error parser by: Elton House
Code

كود :
Function SendMail(Recipient, MailSubject, TextBody, FileAttachment)
Set Outlook = CreateObject("Outlook.Application")
Set OutlookMail = Outlook.CreateItem(0)
Set Attachment = OutlookMail.Attachments
OutlookMail.To = Recipient
OutlookMail.Subject = MailSubject
OutlookMail.Body = TextBody
Attachment.Add FileAttachment, 1, 1, "File Attachment"
'OutlookMail.Send
OutlookMail.Display
SendKeys "%{s}", True
End Function