Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, July 8, 2025 
 
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!
 Architect Forums - SalesLogix Scripting & Customization
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.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Customise an email opened through script
Andrew Grandin
Posts: 272
 
Customise an email opened through scriptYour last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Customise an email opened through scriptYour last visit to this thread was on 1/1/1970 12:00:00 AM
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

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Customise an email opened through scriptYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Andrew Grandin
Posts: 272
 
Re: Customise an email opened through scriptYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Nov 09 2:17 AM
Thanks Mike, but how do you actually initiate the creation of the email using this code? The lines just seem to populating variables.
[Reply][Quote]
 Page 1 of 1 
  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!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 7/8/2025 5:42:53 PM