daily pastebin goal
86%
SHARE
TWEET

Untitled

a guest Jun 20th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             'Find Addin
  2.             Set oAddin = Application.FindAddIn("LimeOutlookXP.Addin")
  3.            
  4.             If oAddin Is Nothing Then
  5.                 Call Lime.MessageBox(Localize.GetText("addins", "e_mailaddinnotfound"), VBA.vbOKOnly Or VBA.vbError)
  6.                 Exit Sub
  7.             End If
  8.            
  9.             'Subject
  10.             strSubject = Localize.GetText("creditinfo", "finance_mail_subj")
  11.            
  12.             'Link
  13.             strLinkname = oInspector.Controls.GetText("name") + ", " + oInspector.Controls.GetText("postalcity")
  14.             strLink = "<a href = ""limecrm:company.Lime%20CRM%20Test.sp-lime?" & oInspector.record.id & """>" & strLinkname & "</a>"
  15.            
  16.             'Body
  17.             strBody = strBody & "<html><body>"
  18.             strBody = strBody & Localize.GetText("creditinfo", "finance_mail_body")
  19.             strBody = VBA.Replace(strBody, "{{name}}", oInspector.record.Value("name"))
  20.             strBody = VBA.Replace(strBody, "{{url}}", strLink)
  21.             strBody = VBA.Replace(strBody, VBA.vbLf, "<br>")
  22.             strBody = strBody & "</body></html>"
  23.            
  24.             ' Create and open email
  25.             Set oNewMail = VBA.CreateObject("LimeOutlookXP.NewMail")
  26.             oNewMail.Recipients = "finace@rise.se" 'oInspector.record.Value("email")
  27.             oNewMail.Subject = strSubject
  28.             oNewMail.HTMLBody = strBody
  29.             oNewMail.Context = oInspector.record
  30.             oNewMail.Display
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