I use the following to send a report via email. There are two things I want, but not sure how to do.
1. What can I do to send this automatically after clicking my command button? Now it prompts the email window and I then have to click "send".
2. Is there a way to automatically name the Object/Report I am sending? I would like the report it sends to be named after the OrderID and maybe the Order Description.
Here is what I have now...
cmdEmail_Click:
stDocName = "rptKnoxWorkOrder"
DoCmd.SendObject acReport, stDocName, "Snapshot Format (*.snp)", "Dispatch@BlahBlah.com", , , "New Order", "Please call with any questions"
1. What can I do to send this automatically after clicking my command button? Now it prompts the email window and I then have to click "send".
2. Is there a way to automatically name the Object/Report I am sending? I would like the report it sends to be named after the OrderID and maybe the Order Description.
Here is what I have now...
cmdEmail_Click:
stDocName = "rptKnoxWorkOrder"
DoCmd.SendObject acReport, stDocName, "Snapshot Format (*.snp)", "Dispatch@BlahBlah.com", , , "New Order", "Please call with any questions"