当前所在位置:珠峰网资料 >> 计算机 >> 计算机等级考试 >> 正文
09年计算机二级辅导:从VB中调入Outlook的高级电子邮件和文件夹功能
发布时间:2009/9/27 17:05:59 来源:城市学习网 编辑:admin
  想象一下如果你的Visual Basic具有处理电子邮件,作业,和其它Outlook 2000的功能,它将会变得多么强大。其实,并不需要很费事我们就可以做到这点。学习高级电子邮件功能,包括添加附件,创建草稿和制作文件夹。
  电子邮件:基础知识深入
  当你自动运行Outlook时,最常见的操作就是发送电子邮件。因此,精通一些高级电子邮件技术是很值得的。下面简单的代码可以制作一个包含附件的邮件,然后发送它,不过它需要Microsoft Outlook 9.0 对象库(Object Library)的支持。
  Dim oOutlookApp As New Outlook.Application
  Dim oItemMail As Outlook.MailItem
  Set oItemMail = oOutlookApp.CreateItem(olMailItem)
  With oItemMail
  .Subject = "Message Generated By _Automating Outlook from Visual Basic"
  .Body = "Outlook is Great!"
  .Attachments.Add ("D:OutlookObjectsSummary.doc")
  .Attachments.Add ("D:CodeSamples.doc")
  .Importance = olImportanceHigh
  .Recipients.Add ("Angela.Jones@aol.com")
  .Recipients.Add ("KevinT@aol.com")
  .Sensitivity = olPersonal
  .Send
  End With
广告合作:400-664-0084 全国热线:400-664-0084
Copyright 2010 - 2017 www.my8848.com 珠峰网 粤ICP备15066211号
珠峰网 版权所有 All Rights Reserved