Hi mommom,
From a command button, I use the code below to send email in SNP Format. My forms and reports are driven by queries and give the user the option to print 1 or 2 copies and or Email the report.(via 3 seperate buttons)
If you can print it you can email it. The (someone@ verizon.net entry sends a blind copy to a backup account on our server, leave this blank if you prefer not to do so.
Experiment with changing acFormatSNP to acFormatHTML or acFormatRTF to achieve the desired appearance or compatability.
The below code opens the report in preview then passes it to outlook or outlook express as an attachment, Fills in the Subject Line then Stopping to allow you to add a further note in the body of the email or send to additional persons. Of course you will need to substitute your stDocName = [YourReportName] and varCriteria = [YourRecID] and target email address "Me!Email"(where it is to go) in order for this to work for you.
******
Private Sub Command173_Click()
On Error GoTo Err_Command173_Click
Me.Refresh
Dim stDocName As String
Dim VarCriteria As String
stDocName = "rptPurchaseOrder"
VarCriteria = "[WoPoID]=" & Me![WoPoID] & ""
DoCmd.OpenReport stDocName, acPreview, , VarCriteria
DoCmd.SendObject acSendReport, "rptPurchaseOrder", acFormatSNP, Me!Email, , "someone@verizon.net", "PO Number " & Me!WoPoID & " P/N " & Me!Partno, "Your PO is attached in SNP Format If unable to open download and install the free Access Snapshot Viewer at.
", , False
Exit_Command173_Click:
Exit Sub
Err_Command173_Click:
MsgBox Err.Description
Resume Exit_Command173_Click
End Sub
********
Just trying to give a little Back, UncleG