Bypasing Outlook Security Sorted, attaching a report, not sorted.

tozey

Registered User.
Local time
Today, 04:32
Joined
Apr 27, 2010
Messages
23
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
 
Thanks for this, I have managed now to go down the route of save the report as RTF then attach and send.

Its not ideal and didnt want the extra step of having to save the document but it isnt really any extra hassle once its set up.

Thanks for taking the time to reply.
 

Users who are viewing this thread

Back
Top Bottom