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!
|
|
Automate Email with RichText
Posted: 12 Sep 08 12:47 PM
|
Hi,
I am writing a script to send automate email. Email is send using CDO.Message. I need to put some text from a rich text into my body email. How do I get the formating in my HTML email body?
BTW. Email will not be displayed before sending. (no user interaction)
If I user controlname.richtext I get to append to my email body
{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\fswiss\fprq2\fcharset0 Verdana;}{\f2\fnil\fcharset0 Arial;}} {\colortbl ;\red0\green0\blue128;\red0\green0\blue0;} \viewkind4\uc1\pard\cf1\lang1033\f0\fs20 The local airport is Miami International Airport and the office is approximately 12 miles from the airport. Below are hotels in the area that the office recommends: \par \par \cf2\b\i\f1\fs18 Dadeland Marriott \par \b0 \par \ul http://www.marriott.com/hotels/travel/miadd-miami-marriott-dadeland/\ulnone \par \lang1036\b \par Hampton Inn\ul\b0 \par www.hamptoninndadeland.com \par \ulnone (305) 269-0072 \par \lang1033\b \par Crowne Plaza Hotel\ul\b0 \par www.crowneplaza.com \ulnone \par (305) 279-7700 \par \cf0\i0\f2\fs20 \par }
If I use controlname.Text I get
The local airport is Miami International Airport and the office is approximately 12 miles from the airport. Below are hotels in the area that the office recommends: Dadeland Marriott http://www.marriott.com/hotels/travel/miadd-miami-marriott-dadeland/ Hampton Inn www.hamptoninndadeland.com (305) 269-0072 Crowne Plaza Hotel www.crowneplaza.com (305) 279-7700 My contact information is below. Please let me know if I can be of further assistance at any time.
Thanks!
|
|
|
|
Re: Automate Email with RichText
Posted: 12 Sep 08 7:31 PM
|
Hi Veronka,
So what is the question exactly?
You can't get HTML from a RichText control. You can construct HTML and use that, but a RichText editor produces RTF only, not HTML - so you cannot use a RichText control for what you are attempting.
-Ryan |
|
|
|
Re: Automate Email with RichText
Posted: 15 Sep 08 7:03 AM
|
I have some formated text, entered by the user in a rich text control, which needs to be part of the email body(formated as well). How do I do that? Can I use another type of control? I do not want to display the email to the user. I want this email to be send automatically, without editing.
- Veronka |
|
|
|
Re: Automate Email with RichText
Posted: 15 Sep 08 9:36 AM
|
You have two options.
1) Instead of using the RichText control, find a 3rd party HTML editor control to use (either as an ActiveX or a .NET Extension) 2) Use a 3rd party component that can convert the RTF to HTML (there are many out there)
Either way, you're looking at including some 3rd party components that you'll need to make sure gets on the client machines (which is automatic if you build this as a .NET Extension).
-Ryan |
|
|
| |
|