Send Email

G

Gee

I just can’t find out how to do this. Everything in this code works
perfectly but I need it to send without having to click the “Send†button
when it gets to Outlook, I need it to just send and go back to the routine.
I had seen some mention of .SEND but I have no idea where to put that or how
to use it. I had seen some things about SendMail also, but don’t know where
to put that either. I’m running out of time and really need to get this
project finished.
Please help and thank you.

Gee

This is my code, what it does is run a timer, in a form from a query that
shows only the “NOC†calls. When the timer gets to 15 minutes it will send
an email to a tech, when it reaches 30 it will send an email to a different
tech. I need it to just run in the background on a computer and not need to
be clicked to send the report.

Private Sub Form_Timer()
Dim currentTime As Date
currentTime = Format(Now(), "h:m:s")
Me.txtCurrentTime.Value = currentTime

If CallDate > 0 Then
NOC = DateDiff("s", TimeValue(CallDate), TimeValue(txtCurrentTime))
End If

If NOC = "900" Then
DoCmd.SendObject acSendReport, "NOCR", acFormatSNP, Me.Text39, , , "NOC
AGING", Me.CallNo, , False
End If
If NOC = "1800" Then
DoCmd.SendObject acSendReport, "NOCR", acFormatSNP, Me.Text41, , ,
Me.CallNo, "NOC Aging", , False
End If
If CallDate > 0 Then
DoCmd.GoToRecord , , acNext
Else: DoCmd.GoToRecord , , acFirst
End If

End Sub
 
G

Gee

I downloaded the MapiLab Addin and it didn't solve my problem. I'm not
getting a security warning, the email it's self pops up and I have to click
the "Send" button on the email before it will send. I need it to go WITHOUT
clicking that send button, to do it on it's own.
I appreciate any help I can get because this is making me lose sleep at night!
:)
 
G

Gee

Oh, you're RIGHT!!
Thanks so much!
Now all I have to do is figure out how to bypass that security message and
I'm DONE!
Thanks!

ErezM via AccessMonster.com said:
i think you have the "False" argument set in the wrong place (it should be
the 9th argument and yours is at the 10th)
if you follow the datatips(or quik info, i never understood who is who) that
pops up while filling the details, the "False" should be at the "EditMessage"
argument (which, as it implies, says you do not want to edit the message
before it is sent)

good luck
I downloaded the MapiLab Addin and it didn't solve my problem. I'm not
getting a security warning, the email it's self pops up and I have to click
the "Send" button on the email before it will send. I need it to go WITHOUT
clicking that send button, to do it on it's own.
I appreciate any help I can get because this is making me lose sleep at night!
:)
if youre using outlook to send the mails, you need to add an addin that
bypasses the security measures.
[quoted text clipped - 49 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Update Open Form 3
Timer Count 9
Update ALL records 1
Send email ? 4
Don't want to send mail 6
Send Email If 5
Send Mail If Statement 5
Sending An Email 4

Top