Paul160 Posted May 25, 2021 Report Share Posted May 25, 2021 I am a complete novice, but I am hoping for some expertise. I am trying to convert my Microsoft access database to Caspio. I am stuck trying to initiate something like the following which i use successfully in access to auto send invoices and statements via email. The vba code is below Public Function EmailInv() On Error Resume Next DoCmd.OutputTo acOutputReport, "InvoiceCustomer", acFormatPDF, "G:\Shared drives\Office\Invoices\" & Forms!frmMain!JobNumber & ".pdf" DoCmd.Close acReport, "InvoiceCustomer", acSaveNo Dim OApp As Object, OMail As Object, signature As String Set OApp = CreateObject("Outlook.Application") Set OMail = OApp.CreateItem(0) With OMail .Display End With signature = OMail.HTMLBody With OMail '.To = "someone@somedomain.com" '.Subject = "Type your email subject here" '.Attachments.Add .To = Forms!frmMain.Form![Text245] .Attachments.Add ("G:\Shared drives\Office\Invoices\" & Forms!frmMain!JobNumber & ".pdf") .Subject = "Invoice from Perth Rewind Industries for " & Forms!frmMain!CustomerName & "" .HTMLBody = "Please see the attached Invoice for Job " & Forms!frmMain!JobNumber & "" & vbNewLine & signature '.Send End With Set OMail = Nothing Set OApp = Nothing End Function Can anyone help me in regards to this? Quote Link to comment Share on other sites More sharing options...
CoopperBackpack Posted May 25, 2021 Report Share Posted May 25, 2021 Hello @Paul160, As far as I know, when importing MS Access files to Caspio, it is possible to import only tables and relationships. Other functionality should be recreated using Caspio features. As for emails, there are 3 options to set them in Caspio: 1) On DataPages: the email is sent when the data is submitted or updated/deleted depending on the DataPage type. You may want to review these articles: https://howto.caspio.com/automatic-emails/automatic-email-types/ https://howto.caspio.com/automatic-emails/acknowledgement-and-notification-emails/ https://howto.caspio.com/automatic-emails/file-attachments-in-emails/ 2) Using Triggered Actions: the email can be sent when the data is inserted/updated/deleted in the table https://howto.caspio.com/tables-and-views/triggered-actions/ 3) Using Tasks: the email can be sent on-demand or based on a predefined schedule https://howto.caspio.com/tasks/ Hope this helps. Quote Link to comment Share on other sites More sharing options...
Paul160 Posted May 25, 2021 Author Report Share Posted May 25, 2021 Thanks @CooperBackpack, I was hoping that there may be a javascript solution especially for the outputto function. I will certainley have a look at your suggestions & thanks again. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.