287 ,用 lotus notes 发送邮件, 第一种方法, Sub SendWithLotus() Dim noSession As Object, noDatabase As Object Dim noDocument As Object, noAttachment As Object Dim FileSelf As String Dim i As Long Const EMBED_ATTACHMENT = 1454 Const stSubject As String = "For Lotus VBA Programming Test only" Dim stMsg As String FileSelf = + "\" + stMsg = "Bst & Rgds" & vbCrLf &_ & vbCrLf &_ vbCrLf &_ "**************************************************************************" & vbCrLf &_ "(This's an automated e-mail notification, please do not reply this message.)" Dim vaRecipient As Variant vaRecipient = ("huangfeng8211@") 'Insert Lotus object. Set noSession = CreateObject("") Set noDatabase = ("", "D:\notes\data\mail3\") If = False Then Set noDocument = Set noAttachment = ("Body") EMBED_ATTACHMENT, "", FileSelf With noDocument .Form = "Memo" .SendTo = vaRecipient .Subject = stSubject .Body = stMsg .SAVEMESSAGEONSEND = True .PostedDate = Now() .SEND 0, vaRecipient End With Set noDocument = Nothing Set noDatabase = Nothing Set noSession = Nothing AppActivate "Microsoft Excel" MsgBox "This file be sent", vbInformation End Sub 第二种方法 Sub SendWithLotus() Dim noSession As Object, noDatabase As Object Dim noDocument As Object, noAttachment As Object Dim vaFiles As Variant Dim i As Long Const EMBED_ATTACHMENT = 1454 Const stSubject As String = "For Lotus VBA Programming Test only" Const stMsg As String = "This file is for you! just for reference" & vbCrLf & "I am StanleyPan" Dim vaRecipient As Variant vaRecipient = ("stanleypan2000@", "@") vaFiles = (FileFilter:="Excel Filer (*.xls),*.xls", Title:="Attach files for outgoing E_Mail", MultiSelect:=True) If Not IsArray(vaFiles) Then Exit Sub 'Insert Lotus object. Set noSession =