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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

emailing a report

Status
Not open for further replies.

andyukcy

Technical User
Jul 9, 2003
64
Hi all,

I have a form "Emploees" and i have a button (see event procedure below) which when pressed, it requires you to select a format (e.g.Rich text format, HTML etc) and opens an outlook window with the form as a report attachment.

I would like the outlook window which opens up to have a specified recepient, title, and if possible a message body.

If possible i would even like not to have the intermediate window which asks to select a format and to have RTF to be the default format.


Private Sub Command125_Click()
On Error GoTo Err_Command125_Click

Dim stDocName As String

stDocName = "Employees"
DoCmd.SendObject acReport, stDocName

Exit_Command125_Click:
Exit Sub

Err_Command125_Click:
MsgBox Err.Description
Resume Exit_Command125_Click

End Sub
 
DoCmd.SendObject acReport, stDocName, acFormatRTF, "specified recepient", , , "title", "Message text"
Feel free to play with the F1 key.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top