H
how to send a e-mail with a annex automa
dear all ,
please help me to check the following VBA about sending e-mail automatickly,
i didnot know why can i not sent the TYPE of . pdf.
Sub SendMail(MailTo As String, MailTopic As String, MailContent As String,
MailAttachment As String)
On Error Resume Next
Dim objMail As MailItem
Set objOutlook = New Outlook.Application
Set objMail = objOutlook.CreateItem(olMailItem)
With objMail
> .To = MailTo
> .Subject = MailTopic
> .Body = MailContent
> .Attachments.Add MailAttachment
> .Send
End With
Set objMail = Nothing
End Sub
Sub test()
SendMail "zhaoyini1233732@163.com", "This is auto send mail by excel",
"enclosing is code", "C:\Outlook.xls"
End Sub
thank you
yini
please help me to check the following VBA about sending e-mail automatickly,
i didnot know why can i not sent the TYPE of . pdf.
Sub SendMail(MailTo As String, MailTopic As String, MailContent As String,
MailAttachment As String)
On Error Resume Next
Dim objMail As MailItem
Set objOutlook = New Outlook.Application
Set objMail = objOutlook.CreateItem(olMailItem)
With objMail
> .To = MailTo
> .Subject = MailTopic
> .Body = MailContent
> .Attachments.Add MailAttachment
> .Send
End With
Set objMail = Nothing
End Sub
Sub test()
SendMail "zhaoyini1233732@163.com", "This is auto send mail by excel",
"enclosing is code", "C:\Outlook.xls"
End Sub
thank you
yini