Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat. The purpose of this eBook is to educate the reader about ransomware attacks.
Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.
Sub amendOutbox() Dim olkApp As Object Dim mai As Object Dim acct As Long acct = getAccount If acct = 0 Then acct = 1 Set olkApp = CreateObject("outlook.application") For Each mai In olkApp.Session.GetDefaultFolder(4).items If mai.Class = 43 Then With mai .Importance = 2 .ReadReceiptRequested = True .OriginatorDeliveryReportRequested = True .Attachments.Add "e:\0\Access - (001) 042307.ADA Fee Proposal.pdf", 5 .SendUsingAccount = olkApp.Session.Accounts.Item(acct) ' Need to establish the account required ... but once set can be hard coded. .Send MsgBox acct & vbNewLine & olkApp.Session.Accounts.Item(acct) End With End If Next End Sub Function getAccount() As Long Dim olkApp As Object Dim i As Long ' Accounts only valid for 2007 and on! 'can embed it as Access call if required via: ' acct = getaccount() Set olkApp = CreateObject("outlook.application") For i = 1 To olkApp.Session.Accounts.Count If (MsgBox("Use Account " & olkApp.Session.Accounts.Item(i).SmtpAddress, vbYesNo)) = vbYes Then 'olkApp.Session.accounts.item(i) getAccount = i Exit For End If Next ' MsgBox "account selected as :> " & getAccount End Function