SHARE
TWEET

Untitled

a guest May 20th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. bodytext =
  2. (join<br>
  3. <p>Hej %name%!
  4. </p>
  5. )
  6. x1 := ComObjACtive("Excel.Application")
  7.  
  8. x = 0
  9.  
  10. for cell in x1.range("A:A")
  11. {
  12.     x++
  13.     if (cell.text == ""){
  14.         continue
  15.         }
  16.     name := x1.Range("B"x).Value
  17.     emailTo := cell.text
  18.    
  19.     try
  20.         outlookApp := ComObjActive("Outlook.Application")
  21.     catch
  22.         outlookApp := ComObjCreate("Outlook.Application")
  23.     MailItem := outlookApp.CreateItem(0)
  24.     MailItem.BodyFormat := 2
  25.     MailItem.Display
  26.  
  27.     MailItem.HTMLBody := bodytext
  28.     MailItem.To := emailTo
  29.     Sleep, 2000
  30.     ToolTip, Email sent to %name%, #%x%
  31. }
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
 
Top