C
Ceasarina
I´m trying to send messages with Outlook from Access 2003. This code works
just fine on Access 2000, but with 2003 it seems to work ONE TIME. Then I
have to restart the computer to make it work ONE TIME again...
Why? Would love to have some tips...
I have tried to add "outApp.quit" with the same result.
Function TestMail()
Dim outApp As Outlook.Application
Dim outMsg As MailItem
Dim Cancel As Boolean
Set outApp = CreateObject("Outlook.Application")
Set outMsg = outApp.CreateItem(olMailItem)
With outMsg
.To = "(e-mail address removed)"
.Subject = "Test av mailfunktion"
.Body = "Hej Peter!" & vbCrLf & "Jag testar och leker."
.Attachments.Add "C:\bilder\banner.jpg"
.Send
End With
Set outApp = Nothing
Set outMsg = Nothing
End Function
just fine on Access 2000, but with 2003 it seems to work ONE TIME. Then I
have to restart the computer to make it work ONE TIME again...
Why? Would love to have some tips...
I have tried to add "outApp.quit" with the same result.
Function TestMail()
Dim outApp As Outlook.Application
Dim outMsg As MailItem
Dim Cancel As Boolean
Set outApp = CreateObject("Outlook.Application")
Set outMsg = outApp.CreateItem(olMailItem)
With outMsg
.To = "(e-mail address removed)"
.Subject = "Test av mailfunktion"
.Body = "Hej Peter!" & vbCrLf & "Jag testar och leker."
.Attachments.Add "C:\bilder\banner.jpg"
.Send
End With
Set outApp = Nothing
Set outMsg = Nothing
End Function