DoCmd.SendObject and Signatures

C

Chris

Hi I'm trying to email reports out of my database and I want to include the
signature of the person sending the Email. This database has a number of
users and I would like to use their default email. The code I am using is:

Private Sub cmdEmail_Click()
On Error GoTo Err_cmdEmail_Click

Dim strDocName As String
Dim strEmail As String
Dim strMailSubject As String
Dim strMsg As String
Dim strUserName As String

strDocName = Me.lstRpt
strEmail = Me.txtSelected & vbNullString
strMailSubject = Me.txtMailSubject & vbNullString
strMsg = Me.txtMsg & vbNullString & vbCrLf & vbCrLf & "Your Name"

DoCmd.SendObject objecttype:=acSendReport, _
ObjectName:=strDocName, outputformat:=acFormatRTF, _
To:=strEmail, CC:="(e-mail address removed)", Subject:=strMailSubject,
MessageText:=strMsg

Exit_cmdEmail_Click:
Exit Sub

Err_cmdEmail_Click:
MsgBox Err.Description
Resume Exit_cmdEmail_Click

End Sub
 

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

Top