Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.
Dim patha As String Dim result As Integer Dim displaymessage As Boolean Dim objOutlook As Outlook.Application Dim objOutlookMsg As Outlook.MailItem Dim objOutlookRecip As Outlook.Recipient Dim objOutlookAttach As Outlook.Attachment patha = dta_base_link_audit_tms.Text displaymessage = True ' Create the Outlook session. Set objOutlook = CreateObject("Outlook.Application") ' Create the message. Set objOutlookMsg = objOutlook.CreateItem(olMailItem) With objOutlookMsg ' Add the To recipient(s) to the message. Set objOutlookRecip = .Recipients.Add("email address") objOutlookRecip.Type = olTo ' Add the CC recipient(s) to the message. 'Set objOutlookRecip = .Recipients.Add("") ' objOutlookRecip.Type = olCC ' Add the BCC recipient(s) to the message. ' Set objOutlookRecip = .Recipients.Add("") ' objOutlookRecip.Type = olBCC ' Set the Subject, Body, and Importance of the message. .Subject = "dbase backup on " & Format(Now, "mmm dd yyyy hh:mm") .Body = "This is the audit dbase backup updated on " & Format(Now, "mmm dd yyyy hh:mm") & vbCrLf & vbCrLf .Importance = olImportanceHigh 'High importance ' Add attachments to the message. 'If Not IsMissing(AttachmentPath) Then Set objOutlookAttach = .Attachments.Add(patha) 'End If ' Resolve each Recipient's name. For Each objOutlookRecip In .Recipients objOutlookRecip.Resolve Next ' Should we display the message before sending? If displaymessage Then .Display Else .Save .Send End If End With Set objOutlook = Nothing
|Excel To Access Database Transfer||14||23|
|maro to copy and paste from one worksheet to another based on a condition||11||24|
|How prevent more than one record as the default||8||0|
|Ensuring all processes are complete before continuing||6||0|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
11 Experts available now in Live!