如何将Excel文件转换为电子邮件发送链接

时间:2010-05-12 20:05:08

标签: vba excel-vba excel

Mvalue = MonthName(5, True)
fileL = "\bobby\outside\"

myFile = fileL & Mvalue & Right(Year(Date), 2) & "\Goodbye - " & myfdate & ".xls"

    Set omail = CreateItem(olMailItem)

    With omail

        .Subject = "Hello"
        .BodyFormat = olFormatHTML
        .HTMLBody = myFile

如何将.HTMLBody = myFile转换为将要发送的电子邮件中的链接?

1 个答案:

答案 0 :(得分:0)

您需要一个HTML链接:

.HTMLBody = "<a href='" & myFile & "'>Linky</a>"