Morning, I have a code set here that will enable me to send a doc by way of email and prompts users for format and then brings up the email all automatic. Is there anyway I can get it to populate with the send to and all they have to do is hit send?
Can this be referenced back to a macro? I can create that send doc in macro, but not sure how to link the 2 together. Any help would be appreciated thanks!
Private Sub Command12_Click()
On Error GoTo Err_Command12_Click
Dim strVal As String
strVal = Forms!TimeslotList!CircuitID
stDocName = "Circuit Timeslot List"
DoCmd.OpenReport "Circuit Timeslot List", acViewPreview, , "[Circuit ID]= '" & strVal & "'"
DoCmd.SendObject acSendReport, stDocName
DoCmd.Close acReport, "Circuit Timeslot List"
Exit_Command12_Click:
Exit Sub
Err_Command12_Click:
MsgBox Err.Description
Resume Exit_Command12_Click
End Sub
Private Sub Command144_Click()
On Error GoTo Err_Command144_Click
Dim stDocName As String
stDocName = "TEST3"
DoCmd.SendObject acReport, stDocName
Exit_Command144_Click:
Exit Sub
Err_Command144_Click:
MsgBox Err.Description
Resume Exit_Command144_Click
End Sub
Can this be referenced back to a macro? I can create that send doc in macro, but not sure how to link the 2 together. Any help would be appreciated thanks!
Private Sub Command12_Click()
On Error GoTo Err_Command12_Click
Dim strVal As String
strVal = Forms!TimeslotList!CircuitID
stDocName = "Circuit Timeslot List"
DoCmd.OpenReport "Circuit Timeslot List", acViewPreview, , "[Circuit ID]= '" & strVal & "'"
DoCmd.SendObject acSendReport, stDocName
DoCmd.Close acReport, "Circuit Timeslot List"
Exit_Command12_Click:
Exit Sub
Err_Command12_Click:
MsgBox Err.Description
Resume Exit_Command12_Click
End Sub
Private Sub Command144_Click()
On Error GoTo Err_Command144_Click
Dim stDocName As String
stDocName = "TEST3"
DoCmd.SendObject acReport, stDocName
Exit_Command144_Click:
Exit Sub
Err_Command144_Click:
MsgBox Err.Description
Resume Exit_Command144_Click
End Sub