Hello To All:
Right now I have been working with the code bellow:
Private Sub Command127_Click()
On Error Resume Next
DoCmd.SendObject acSendQuery, "Query#1", acFormatXLSX, John.Doe@aol.com, , , [Forms]![A_frm_master_pro_id]![qte_proj_id_cmb] & "_" & [Forms]![A_frm_master_pro_id]![qte_ven_cmb], _, True
End Sub
As you can see the e-mail is currently fixed (this is for testing purposes) I will be later changing this, for it to choose an e-mail from the combo box.
My question is:
Is there a way to include code to mail the file generated via outlook e-mail directly from Access in the same process as in the one that is used to generate the dynamic file name?
- I have a query, that is controlled by a combo box.
- Depending on the value in the combo box, when I run my query, I get the info, filtered by value in the combo box.
- I also created a button that exports the query to Excel, and generates a dynamic file name based on different criteria (time, date & value in the combo box).
Right now I have been working with the code bellow:
Private Sub Command127_Click()
On Error Resume Next
DoCmd.SendObject acSendQuery, "Query#1", acFormatXLSX, John.Doe@aol.com, , , [Forms]![A_frm_master_pro_id]![qte_proj_id_cmb] & "_" & [Forms]![A_frm_master_pro_id]![qte_ven_cmb], _, True
End Sub
As you can see the e-mail is currently fixed (this is for testing purposes) I will be later changing this, for it to choose an e-mail from the combo box.
My question is:
Is there a way to include code to mail the file generated via outlook e-mail directly from Access in the same process as in the one that is used to generate the dynamic file name?