RabSwinney
Technical User
Im having an issue with one of my databases when trying to email, we now use Office365 which I cant autoemail from the database, how can I change this code to sens using SMTP
Function Mcr_Send_New_Supplier _SendVendorRequest()
On Error GoTo Mcr_Send_New_Supplier_Timber_SendVendorRequest_Err
SendKeys "(F9)", True
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport "Rpt_SupplierDataNew", acViewPreview, "", "[SupplierName]=[Forms]![FRm_New_Supplier_Timber]![SupplierName]"
DoCmd.SendObject acReport, "Rpt_SupplierDataNew", "RichTextFormat(*.rtf)", "", "", "", "New Vendor Approval Form", "", False, ""
DoCmd.SetWarnings False
MsgBox "Supplier details have now been sent to accounts", vbOKOnly, ""
DoCmd.Close acReport, "Rpt_SupplierDataNew"
Mcr_Send_New_Supplier _SendVendorRequest_Exit:
Exit Function
Mcr_Send_New_Supplier _SendVendorRequest_Err:
MsgBox Error$
Resume Mcr_Send_New_Supplier _SendVendorRequest_Exit
End Function
Function Mcr_Send_New_Supplier _SendVendorRequest()
On Error GoTo Mcr_Send_New_Supplier_Timber_SendVendorRequest_Err
SendKeys "(F9)", True
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport "Rpt_SupplierDataNew", acViewPreview, "", "[SupplierName]=[Forms]![FRm_New_Supplier_Timber]![SupplierName]"
DoCmd.SendObject acReport, "Rpt_SupplierDataNew", "RichTextFormat(*.rtf)", "", "", "", "New Vendor Approval Form", "", False, ""
DoCmd.SetWarnings False
MsgBox "Supplier details have now been sent to accounts", vbOKOnly, ""
DoCmd.Close acReport, "Rpt_SupplierDataNew"
Mcr_Send_New_Supplier _SendVendorRequest_Exit:
Exit Function
Mcr_Send_New_Supplier _SendVendorRequest_Err:
MsgBox Error$
Resume Mcr_Send_New_Supplier _SendVendorRequest_Exit
End Function