Hi All
I have a database which sends a number of different attachments and different recipients dependant on query results . This all works fine
' SendSites
'
'------------------------------------------------------------
Function SendAutostore()
Set MySet = New ADODB.Recordset
MySet.Open "WMS_EMAILS", CurrentProject.Connection, adOpenStatic
Do Until MySet.EOF
[Forms]![Send].[QSite].Value = MySet![ShippingFrom]
[Forms]![Send].[QEmail].Value = MySet![Addresses (seperate with ]
DoCmd.SendObject acQuery, "Qry_Send_Autostore_File", "Microsoft Excel (*.xls)", [Forms]![Send].[QEmail], "", "", "Email Body", False, ""
MySet.MoveNext
Loop
End Function
I have 1 file which i need to send a .csv file via email. Being as Access doesnt allow me to send .csv files automatically, I've had to go down the route of downloading the correctly formatted file on the c drive of the laptop. Thanks to excellent support from xenou, this is now done.
I now need to add the functionality of sending this file to the correct recipient dependant on the query results using the code above
Can i simply change this bit of the code to send the file from the c drive?
DoCmd.SendObject acQuery, "Qry_Send_Autostore_File", "Microsoft Excel (*.xls)", [Forms]![Send].[QEmail], "", "",
Or is it not as simple as that?
Cheers
I have a database which sends a number of different attachments and different recipients dependant on query results . This all works fine
' SendSites
'
'------------------------------------------------------------
Function SendAutostore()
Set MySet = New ADODB.Recordset
MySet.Open "WMS_EMAILS", CurrentProject.Connection, adOpenStatic
Do Until MySet.EOF
[Forms]![Send].[QSite].Value = MySet![ShippingFrom]
[Forms]![Send].[QEmail].Value = MySet![Addresses (seperate with ]
DoCmd.SendObject acQuery, "Qry_Send_Autostore_File", "Microsoft Excel (*.xls)", [Forms]![Send].[QEmail], "", "", "Email Body", False, ""
MySet.MoveNext
Loop
End Function
I have 1 file which i need to send a .csv file via email. Being as Access doesnt allow me to send .csv files automatically, I've had to go down the route of downloading the correctly formatted file on the c drive of the laptop. Thanks to excellent support from xenou, this is now done.
I now need to add the functionality of sending this file to the correct recipient dependant on the query results using the code above
Can i simply change this bit of the code to send the file from the c drive?
DoCmd.SendObject acQuery, "Qry_Send_Autostore_File", "Microsoft Excel (*.xls)", [Forms]![Send].[QEmail], "", "",
Or is it not as simple as that?
Cheers