7/8/2025 5:29:02 PM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
|
|
|
|
Customise an email opened through script
Posted: 13 Nov 09 9:38 AM
|
Im using the following code on a button click to create an email in script:
Sub Button3Click(Sender)
Dim name name = picklist1.Text Dim oppid oppid = getfield("Z_OPP_NUMBER","sysdba.Z_OPPORTUNITY_EXT","OPPORTUNITYID = '" & Application.BasicFunctions.CurrentOpportunityID & "'") Dim address address = txtEmail.Text Dim subject subject = "Leadline Opportunity - " & oppid & " Status Update" Dim body body = "Dear ," & vbCrLf & vbCrLf & " With reference to the Leadline sent to you on " & dteLogged.Text & " can you please provide a status " & _ "update for the opportunity to email..... " & _ "" & vbCrLf & vbCrLf & "Regards " & vbCrLf & "Leadline Team"
Application.BasicFunctions.QueMessage "","","",subject,body,""
End Sub
Is there any way to tell outlook what font etc. is to be used when the email is created? When i execute this script the email appears but the boidy of text displays in Time New Roman size 12 not the usual default Arial size 10. |
|
|
|
Re: Customise an email opened through script
Posted: 13 Nov 09 12:33 PM
|
Yes, there is a way in Outlook, however it is now "Secured".
You could always instantiate an Outlook Mailitem object and write HTML into its HTMLBody property, however users will receive a popup box asking them if they want to allow interaction with the item. This was part of the MS lockdown to Outlook due to the Script vulnerabilities that spread around a few years ago.
That being said, outlook 2007 does not seem to block me accessing this property directly.
If you are not using Outlook 2007 (or if you are an get the security prompt) and you would like to bypass it, you could use the Redemption objects (by Dmitry Streblechenko): http://www.dimastr.com/redemption/
By the way, Dimtry works for SAGE as well. He is the Architect and lead developer for the Exchange Link product. I have met him in person and worked directly with him on some previous projects. And, I use Redemption dll for customers work. I have built solutions for at least 5 customers utilizing this tool. The latest one running on 7.5.1
|
|
|
|
Re: Customise an email opened through script
Posted: 14 Nov 09 5:17 AM
|
Hi Andrew
Use:
strHTML1 = "<body><p><font size=2 face=Tahoma> Do whatever formatting you need. strHTML2 = "</font></p></body>"
then your code to make strBody then
MyEmail = strHTML1 & strBody & strHTML2
Essentially you make it into HTML. Mike
|
|
|
| |
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|