Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email Script For Access

Status
Not open for further replies.

gator9

Technical User
May 17, 2002
162
US
Hey guys:

Here is my problem the code below works great. It genrates the repport adds the report as an attachment puts the clients email in the proper place, creats the sub line, and message body.

With that said when the email client I use is activated it ask for my password and then I have to hit the send but on the email to send the message. I woul like it to do all the above, and activate the email client (the bat is what I use) then send the message without me seeing the email client and having to hit anything. Hope this was clear :)

Can anyone help.

Sincerely,

Charles
 
Private Sub MailReport_Click()
On Error GoTo Err_MailReport_Click

Dim stDocName As String
DoCmd.SendObject acReport, "Print Project Finance Report", "RichTextFormat(*.rtf)", , , , "Your Monthly Report", "thanks"

Exit_MailReport_Click:
Exit Sub

Err_MailReport_Click:
MsgBox Err.Description
Resume Exit_MailReport_Click

End Sub

Sorry Forgot the code

Sincerely,

Charles
[URL unfurl="true"]http://gator9.com[/URL]
 
Charles,

Try adding the editmessage argument to your SendObject statement:
Code:
DoCmd.SendObject acReport, "Print Project Finance Report", "RichTextFormat(*.rtf)", [email], , , "Your Monthly Report", "thanks", [highlight]False[/highlight]

Hoc nomen meum verum non est.
 
mismatched data. maybe not putting it in the right place if you have an Idea where it goes let me know.


Sincerely,

Charles
 
Try a zero instead:
Code:
DoCmd.SendObject acReport, "Print Project Finance Report", "RichTextFormat(*.rtf)", [email], , , "Your Monthly Report", "thanks", [highlight]0[/highlight]

Hoc nomen meum verum non est.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top