runtime error 287 when sending mail using vba in access 2003
问题 I am currently writing a vba macro to send e-mails and the messages are created but do not sent as an error is generated. My current code is: Function CreateHURMail(Filename) Dim olApp As Outlook.Application Dim objMail As Outlook.MailItem Set olApp = New Outlook.Application Set objMail = olApp.CreateItem(olMailItem) With objMail .Subject = "Test Message" .Body = "Body Text" .To = "abc@xyz" .Attachments.Add (Filename) .Display On Error Resume Next .Send 'If Err.Number = 287 Then ' MsgBox