Masonlu  
Imports Microsoft.Office.Interop.Outlook

 Private Sub sendMail()
         Dim outObj As New Application
         Dim item As MailItem

        item = outObj.CreateItem(0)
         '设定收件人地址
        item.To = "abc@163.com"
         '设定邮件主题
        item.Subject = "test"
         '设定邮件内容
        item.Body = "dasfdasfsda"
         '设定添附文件
        item.Attachments.Add("c:\tree.txt")
         '发送
        item.Send()
     End Sub

 

posted on 2015-09-12 21:39  Masonlu  阅读(2725)  评论(0)    收藏  举报