I have the following basic Send Object Macro.
Function McrSnapshotCallData()
On Error GoTo McrSnapshotCallData_Err
DoCmd.SendObject acQuery, "Qry_SnapShot", "Excel97- Excel2003Workbook(*.xls)", "xxx@xxx.com", "", "", "Calls", "Please find attached", False, ""
McrSnapshotCallData_Exit:
Exit Function
McrSnapshotCallData_Err:
MsgBox Error$
Resume McrSnapshotCallData_Exit
End Function
I need to be able to send run this macro on a server using a scheduler enabling an email to be sent out.
Currently this requires and outlook account on the server and it does not have one. Is it possible to include SMTP server details so this can be run automatically without me having to log on every night and send this.
Please can you me help adjust this if possible.
Sorry I am not very good with VBA stuff. Thanks
Function McrSnapshotCallData()
On Error GoTo McrSnapshotCallData_Err
DoCmd.SendObject acQuery, "Qry_SnapShot", "Excel97- Excel2003Workbook(*.xls)", "xxx@xxx.com", "", "", "Calls", "Please find attached", False, ""
McrSnapshotCallData_Exit:
Exit Function
McrSnapshotCallData_Err:
MsgBox Error$
Resume McrSnapshotCallData_Exit
End Function
I need to be able to send run this macro on a server using a scheduler enabling an email to be sent out.
Currently this requires and outlook account on the server and it does not have one. Is it possible to include SMTP server details so this can be run automatically without me having to log on every night and send this.
Please can you me help adjust this if possible.
Sorry I am not very good with VBA stuff. Thanks