![]() ![]() On the "on click" click on the "." and paste the code that you want to use.Power Spreadsheets focuses on Microsoft Excel. To add to a menu, create a command button from the "Design Tab", right click on the command button that was just placed on the form, and go the the event tab. Private Sub cmdEmailConfirmedUSA3_Click() Private Sub cmdEmailConfirmedUSA2_Click() Subject = "USA Mobility Wireless Telecommunication Approval - Reminder 1" " WHERE tblReceiveTemp.USAReceiveStatus = 'NR'" StrSql = "SELECT tblReceiveTemp.USAReceiveStatus,tblReceiveTemp., tblReceiveTemp." & _ Subject = "ATT, Sprint and Verizon Wireless Telecommunication Approval - Reminder 3" Subject = "ATT, Sprint and Verizon Wireless Telecommunication Approval - Reminder 2" Subject = "ATT, Sprint and Verizon Wireless Telecommunication Approval - Reminder 1" 'now use the variable disto with all the email names in the to field of outlook Set rst = db.OpenRecordset(strSql, dbOpenDynaset)ĭistro = distro & " " & rst.Fields("") " WHERE tblReceiveTemp.ATTReceiveStatus = 'NR'OR tblReceiveTemp.SprintReceiveStatus = 'NR' OR tblReceiveTemp.VerizonReceiveStatus = 'NR'" StrSql = "SELECT tblReceiveTemp.ATTReceiveStatus, tblReceiveTemp.SprintReceiveStatus, tblReceiveTemp.VerizonReceiveStatus, tblReceiveTemp., tblReceiveTemp." & _ Set oOMail_001 = oOApp_001.CreateItem(olMailItem) Set oOApp_001 = CreateObject("Outlook.Application") 'Sets the email distro and subject line to blank You may need a reference to outlook to get this to work.Īnother option could be for you to create a custom ribbon and put the button you want on that ribbon instead of completely hiding the ribbon. ![]() MsgBox "Error occured at " errNameFrom:" & Err.Number & " " & Err.Description ![]() ' Should we display the message before sending? If Not IsMissing(AttachmentPath) And AttachmentPath "" Then ' Add the To recipient(s) to the message. Set objOutlookMsg = objOutlook.CreateItem(olMailItem) Set objOutlook = CreateObject("Outlook.Application") StrValue = Email_Via_Outlook(strAddress, "Message Title ", strMessage, True, "FullPathAndFileName.PDF")įunction Email_Via_Outlook(varAddress, varSubject, varBody, DisplayMsg As Boolean, Optional AttachmentPath)ĭim objOutlookAttach As Outlook.Attachment 'follow the output with a function call to send the PDF via outlook ![]() 'Behind a comand button save the report as PDF fileĭoCmd.OutputTo acOutputReport, "rptReportName", acFormatPDF, "FullPathAndFileName.pdf", False ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |