在开始编写代码之前,先添加对Outlook 8.0 object library的引用。
代码如下:
Option Explicit
Dim App As Object Dim Itm As Object
Set App = CreateObject("Outlook.Application") Set Itm = App.CreateItem(0) With Itm .Subject = "A tip from vbCode Magician" .To = "newvb@21cn.com" .Body = "VB编程乐园 www.vbeden.com" .Send End With  
|