Email A Message (not report or table)

XaloRichie

Registered User.
Local time
Today, 05:17
Joined
Jul 2, 2003
Messages
70
OK I know its possible to mail reports etc but it seems that the user will always be aware becase either Outlook or Access pops up a send message box. So if you just want to send a message e.g. "Till Cash does not Balance with Cash book"
Does the user have to be aware?

Appart from the fact that the messagebox requires a click it would save embarassment if it can be done "covertly" !
 
If you are using the Docmd.SendObject function, set the EditMessage parameter=False.
 
Or use this code...
Code:
Private Sub YourButton_Click()

      Dim EmailApp, NameSpace, EmailSend As Object

      Set EmailApp = CreateObject("Outlook.Application")
      Set NameSpace = EmailApp.getNameSpace("MAPI")
      Set EmailSend = EmailApp.CreateItem(0)
      
      EmailSend.To = "someone@somewhere.com"
      EmailSend.Subject = "Cash"
      EmailSend.Body = "Hello," & vbCrLf & vbCrLf & "Till Cash does not Balance with Cash book" & vbCrLf & vbCrLf & "Regards Me"
      EmailSend.Send
      
      Set EmailApp = Nothing
      Set NameSpace = Nothing
      Set EmailSend = Nothing

End Sub

IMO
 
Tried this and

I tried that code but i AM getting a run time error 429
"Activex component can't create object"

In Debug the following line is highlighted

Set EmailApp = CreateObject("Outlook.Application")

What can I do?
 
You can use the SendObject command instead, setting the final parameter to False as has been previously suggested.
 

Users who are viewing this thread

Back
Top Bottom