【发布时间】:2022-04-29 11:59:01
【问题描述】:
我在 MS Access 2013 中尝试使用 Outlook 2013 为 olMailItem 设置回复地址。
我当前的代码给了我:
运行时错误“287” 应用程序定义或对象定义的错误
Private Sub email_button_click()
' *** SETUP OUTLOOK ***
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Set OutApp = New Outlook.Application
Set OutMail = OutApp.CreateItem(olMailItem)
' *** DO SOME OTHER STUFF ****
....
With OutMail
.Subject = "Test"
.Body = "Whatever"
.To = "test@test.com"
.ReplyRecipients.Add "notatest@test.com" <- Error here
.Display
End With
' *** TIDY UP ***
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
很多其他人似乎都能做到。即:
Change reply address in Outlook mail
http://www.ozgrid.com/forum/showthread.php?t=186882
http://www.vbaexpress.com/forum/archive/index.php/t-19993.html
谢谢
道格
【问题讨论】:
-
您想将某人添加到 CC 中吗?如果你是,你可以使用 Outmail.CC = "Email@Something.com"
-
@RyanWildry:“正在尝试设置回复地址”
标签: ms-access outlook vba ms-access-2013