SHARE
TWEET

Untitled

a guest Jun 18th, 2019 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ActiveWorkbook.RefreshAll
  2.  
  3. Dim objOutlook As Object
  4. Dim objMail As Object
  5. Dim ws As Worksheet
  6.  
  7. Set objOutlook = CreateObject("Outlook.Application")
  8. Set ws = ActiveSheet
  9.      
  10. Set objMail = objOutlook.CreateItem(0)
  11.  
  12.     With objMail
  13.         .To = cell.Value
  14.         .Cc = "email@email.com"
  15.         .Subject = cell.Offset(0, 1).Value
  16.         .Body = cell.Offset(0, 2).Value
  17.         .Attachments.Add cell.Offset(0, 3).Value
  18.         .Display
  19.     End With
  20.  
  21.     Set objMail = Nothing
  22. Next cell
  23.  
  24. Set ws = Nothing
  25. Set objOutlook = Nothing
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top