J
J Bard
Attempting to send mail from within Access; get no errors, but no mail
either.
Private Sub Command0_Click()
Dim oa As Outlook.Application
Dim ns As Outlook.NameSpace
Dim mi As Outlook.MailItem
Set oa = New Outlook.Application
Set ns = oa.GetNamespace("mapi")
Set mi = oa.CreateItem(olMailItem)
mi.To = "(e-mail address removed)"
mi.Subject = "test"
mi.Body = "a test"
mi.Send
Set oa = Nothing
Set ns = Nothing
Set mi = Nothing
End Sub
either.
Private Sub Command0_Click()
Dim oa As Outlook.Application
Dim ns As Outlook.NameSpace
Dim mi As Outlook.MailItem
Set oa = New Outlook.Application
Set ns = oa.GetNamespace("mapi")
Set mi = oa.CreateItem(olMailItem)
mi.To = "(e-mail address removed)"
mi.Subject = "test"
mi.Body = "a test"
mi.Send
Set oa = Nothing
Set ns = Nothing
Set mi = Nothing
End Sub