Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Find Addin
- Set oAddin = Application.FindAddIn("LimeOutlookXP.Addin")
- If oAddin Is Nothing Then
- Call Lime.MessageBox(Localize.GetText("addins", "e_mailaddinnotfound"), VBA.vbOKOnly Or VBA.vbError)
- Exit Sub
- End If
- 'Subject
- strSubject = Localize.GetText("creditinfo", "finance_mail_subj")
- 'Link
- strLinkname = oInspector.Controls.GetText("name") + ", " + oInspector.Controls.GetText("postalcity")
- strLink = "<a href = ""limecrm:company.Lime%20CRM%20Test.sp-lime?" & oInspector.record.id & """>" & strLinkname & "</a>"
- 'Body
- strBody = strBody & "<html><body>"
- strBody = strBody & Localize.GetText("creditinfo", "finance_mail_body")
- strBody = VBA.Replace(strBody, "{{name}}", oInspector.record.Value("name"))
- strBody = VBA.Replace(strBody, "{{url}}", strLink)
- strBody = VBA.Replace(strBody, VBA.vbLf, "<br>")
- strBody = strBody & "</body></html>"
- ' Create and open email
- Set oNewMail = VBA.CreateObject("LimeOutlookXP.NewMail")
- oNewMail.Recipients = "finace@rise.se" 'oInspector.record.Value("email")
- oNewMail.Subject = strSubject
- oNewMail.HTMLBody = strBody
- oNewMail.Context = oInspector.record
- oNewMail.Display
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement