Private Sub cmdSendMail_Click()
Dim objMail As Object
Set objMail = CreateObject("c:\winnt\system32\cdonts.dll")
With objMail
.From = "[email protected] "
.To = "[email protected]"
.Subject = "Title"
.Body = "Hello"
.AttachFile "c:\document\ sendmail.txt", "sendmail.txt"
.Send
End With
Set objMail = Nothing
End Sub一运行就出现如下错误:
ActiveX 部件不能创建对象或返回对该对象的引用cdonts.dll 已经在系统中注册过了!
Dim objMail As Object
Set objMail = CreateObject("c:\winnt\system32\cdonts.dll")
With objMail
.From = "[email protected] "
.To = "[email protected]"
.Subject = "Title"
.Body = "Hello"
.AttachFile "c:\document\ sendmail.txt", "sendmail.txt"
.Send
End With
Set objMail = Nothing
End Sub一运行就出现如下错误:
ActiveX 部件不能创建对象或返回对该对象的引用cdonts.dll 已经在系统中注册过了!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货