Office中国论坛/Access中国论坛

标题: 在Excel中通过Outlook发送邮件,可以选择Excel的内容进行发送 [打印本页]

作者: tmtony    时间: 2004-7-1 07:31
标题: 在Excel中通过Outlook发送邮件,可以选择Excel的内容进行发送
在Excel中通过Outlook发送邮件,可以选择Excel的内容进行发送Sub Send_Msg()

Dim objOL As New Outlook.Application

Dim objMail As MailItem
Set objOL = New Outlook.Application

Set objMail = objOL.CreateItem(olMailItem)
With objMail

    .To = "name@domain.com"

    .Subject = "Automated Mail Response"

    .Body = "This is an automated message from Excel. " & _

        "The cost of the item that you inquired about is: " & _

        Format(Range("A1").Value, "$ #,###.#0") & "."

    .Display

End With
Set objMail = Nothing

Set objOL = Nothing

End Sub

作者: secowu    时间: 2005-9-8 17:30
用户类型未定义?
作者: bach    时间: 2008-3-7 16:03
dddddddddddddd




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3