【发布时间】:2014-09-23 15:37:46
【问题描述】:
我有一个 Outlook 宏,我可以在其中创建带有附件的完整邮件,但无法添加保存在 C 盘 (C:\Users\JustinG\AppData\Roaming\Microsoft\Signatures) 中的签名。
签名类型为 .rtf 和 .htm 以及图片。
以下是代码:
Sub Mail_Workbook_1()
Dim OutApp As Object
Dim Outmail As Object
Set OutApp = CreateObject("Outlook.Application")
Set Outmail = OutApp.CreateItem(0)
On Error Resume Next
' Change the mail address and subject in the macro before you run it.
With Outmail
.SentOnBehalfOfName = "justin.gatlin@rediffmail.com"
.To = "abc@xyz.com"
.CC = ""
.BCC = ""
.Subject = "Presentation"
.Body = "Hi Team,"
.Attachments.add ("C:\Users\DurshetwarA\Desktop\Excel Examination_Master_V1.xlsx")
.display
''SendKeys ("%s")
End With
On Error GoTo 0
Set Outmail = Nothing
Set OutApp = Nothing
End Sub
【问题讨论】: