Function SendEmail(ByVal sMail, ByVal sSubject, ByVal sBody, ByVal sCC)
Dim objOutlook As New Outlook.Application
'定义outlook邮件的对象变量
Dim objMail As MailItem
Dim strTo As Variant
Dim sptTo() As String
'创建objOutlook为Outlook应用程序对象
Set objOutlook = New Outlook.Application
'创建objMail为一个邮件对象
Set objMail = objOutlook.CreateItem(olMailItem)
sptTo = Split(sMail, ";")
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
With objMail
.Subject = sSubject
.HTMLBody = sBody
For Each strTo In sptTo()
If Len(Trim(strTo)) <> 0 Then
.Recipients.Add strTo
End If
Next
.CC = sCC