287,用lotusnotes发送邮件,第一种方法,SubSendWithLotus()DimnoSessionAsObject,noDatabaseAsObjectDimnoDocumentAsObject,noAttachmentAsObjectDimFileSelfAsStringDimiAsLongConstEMBED_ATTACHMENT=1454ConststSubjectAsString="ForLotusVBAProgrammingTestonly"DimstMsgAsStringFileSelf=+"\"+="Bst&Rgds"&vbCrLf&&vbCrLf&_vbCrLf&_"**************************************************************************"&vbCrLf&_"(This'sanautomatede-mailnotification,pleasedonotreplythismessage.)"DimvaRecipientAsVariant'=CreateObject("")SetnoDatabase=("","D:\notes\data\mail3\")===("Body"),"",="Memo".SendTo=====Now().SEND0,vaRecipientEndWithSetnoDocument=NothingSetnoDatabase=NothingSetnoSession=NothingAppActivate"MicrosoftExcel"MsgBox"Thisfilebesent",vbInformationEndSub第二种方法SubSendWithLotus()DimnoSessionAsObject,noDatabaseAsObjectDimnoDocumentAsObject,noAttachmentAsObjectDimvaFilesAsVariantDimiAsLongConstEMBED_ATTACHMENT=1454ConststSubjectAsString="ForLotusVBAProgrammingTestonly"ConststMsgAsString="Thisfileisforyou!justforreference"&vbCrLf&"IamStanleyPan"DimvaRecipientAsVariantvaFiles=(FileFilter:="ExcelFiler(*.xls),*.xls",Title:="AttachfilesforoutgoingE_Mail",MultiSelect:=True)IfNotIsArray(vaFiles)ThenExitSub'=CreateObject("")SetnoDatabase=("","D:\notes\data\mail3\")===("Body")WithnoAttachmentFori=1ToUBound(vaFiles).EMBEDOBJECTEMBED_ATTACHMENT,"",vaFiles(i)="Memo".SendTo=vaRe
用VBA操纵Lotus notes发邮件 来自淘豆网www.taodocs.com转载请标明出处.