excel vba 调用outlook发邮件的问题

2024-12-27 09:47:02
推荐回答(1个)
回答1:

以下 Visual Basic for Applications (VBA) 示例新建一个邮件,将 Q496.xls 作为附件(不是链接)附加,并为附件设置一个描述性标题。
Set myOlApp = CreateObject("Outlook.Application")

Set myItem = myOlApp.CreateItem(olMailItem)
Set myAttachments = myItem.Attachments
myAttachments.Add "C:\My Documents\Q496.xls", _
olByValue, 1, "4th Quarter 1996 Results Chart"