Hello
I have managed to send a mail and bypass the Outlook security message by using this code
Sub SendMail()
Dim outl As Outlook.Application
Set outl = New Outlook.Application
Dim mi As Outlook.mailitem
Set mi = outl.CreateItem(olMailItem)
mi.Body = "Hello"
mi.Subject = "Please Read"
mi.To = "email address"
mi.Send
Set mi = Nothing
Set outl = Nothing
End Sub
However I cannot work out how to send my report with it as an attachment.
I could do this via sendobject but I need to avoid the outlook security.
I have looked and looked but can find no way of attaching my report held in access.
(Access 2003)
Any help would be appreciated.
Thanks
tozey
I have managed to send a mail and bypass the Outlook security message by using this code
Sub SendMail()
Dim outl As Outlook.Application
Set outl = New Outlook.Application
Dim mi As Outlook.mailitem
Set mi = outl.CreateItem(olMailItem)
mi.Body = "Hello"
mi.Subject = "Please Read"
mi.To = "email address"
mi.Send
Set mi = Nothing
Set outl = Nothing
End Sub
However I cannot work out how to send my report with it as an attachment.
I could do this via sendobject but I need to avoid the outlook security.
I have looked and looked but can find no way of attaching my report held in access.
(Access 2003)
Any help would be appreciated.
Thanks
tozey