Looking for control that will allow me to create a html body for an email
Hi, looking for a way to create text only that i can add to an email.
I would like it to be able to indent add bullet point colour fonts and colour background of fonts ( ie highlight)
does anyone know of a free control or usercontrol that would allow a type of word processor and then create html text
that i can save as a template when sending an email.
Re: Looking for control that will allow me to create a html body for an email
I have a very old module for converting RTF to HTML.
I've used it in the past to convert the output of the RichTextBox control to an HTML file
The URL in header is not functional anymore and I also can't find it on the wayback archive..
Code:
'Version 3.03
'Copyright Brady Hegberg 2000
' I'm not licensing this software but I'd appreciate it if
' you'd to consider it to be under an lgpl sort of license
'More information can be found at
'http://www2.bitstream.net/~bradyh/downloads/rtf2htmlrm.html
'Converts Rich Text encoded text to HTML format
'if you find some text that this function doesn't
'convert properly please email the coded text to
'bradyh@bitstream.net
'Thanks to various people for assistance including
' Anthony DiMauro for work on 3.0x font support
' ...and many others
Re: Looking for control that will allow me to create a html body for an email
Originally Posted by Arnoutdv
I have a very old module for converting RTF to HTML.
I've used it in the past to convert the output of the RichTextBox control to an HTML file
The URL in header is not functional anymore and I also can't find it on the wayback archive..
Code:
'Version 3.03
'Copyright Brady Hegberg 2000
' I'm not licensing this software but I'd appreciate it if
' you'd to consider it to be under an lgpl sort of license
'More information can be found at
'http://www2.bitstream.net/~bradyh/downloads/rtf2htmlrm.html
'Converts Rich Text encoded text to HTML format
'if you find some text that this function doesn't
'convert properly please email the coded text to
'bradyh@bitstream.net
'Thanks to various people for assistance including
' Anthony DiMauro for work on 3.0x font support
' ...and many others
I will attach a zipped version of the code.
Tks i got this today and already had a play. does most of what i need but does not highlight text background.
I will try to study whats there and see if i can add the feature to highlight text. but never really dealt with RTB codes etc
Re: Looking for control that will allow me to create a html body for an email
out of interest, would it be possible to use a browser/RC6 to load a webpage that has a pre built web based HTML editor like what we use on this site
that i could embed in a form and create text etc. then use the browser text out put.??
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Hi Elroy. I have an app that i save information to. once processed i want to be able to email with Outlook.
I have this all working , but was asked to include some text in the body of the email.
I did not want to hard code into my app, so made a settings page to store email subject and email body.
I would like to give the user the ability to create an email with basic items ie Bold, Highlight text , font colour, Bullet points, indenting.
I thought there would be a simple editor that i could incorporate into my app that would enable a user to add/create their own email body without knowing html.
Re: Looking for control that will allow me to create a html body for an email
If it were me, I'd probably use the RichTx32.ocx (Microsoft Rich Textbox) control, and design a little editor for it, as I've actually done that before, and it's not difficult:
Then, upon the click of some button, I'd grab the RTF text from it and convert it to HTML, which, so long as the RTF text was fairly simple, wouldn't be difficult at all.
Anyway, that's how I'd do it.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Re: Looking for control that will allow me to create a html body for an email
Here, I've attached a little project that includes this little RTF label editor. This particular editor is designed to be used in the VB6 IDE design-time mode, and not by the user. To call up the editor, right-click the label on Form1 and click "Edit".
Much of the "editor" functionality you're asking for is there. Maybe you can modify it for your needs.
Also, I noticed that editor is acting a bit glitchy. I haven't used it in a while, and that's something new. I don't know if that's updates to RichTx32.ocx, or something about Windows 11, or whatever. But, you're on your own there.
I fixed it. In the frmRtfEdit form (RtfEdit.frm), in the QueryUnload event, a "Cancel = True" line is needed, as follows:
Code:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = vbFormControlMenu Then
bCanceled = True
Hide
Cancel = True
End If
End Sub
That fixes it.
Good Luck.
Last edited by Elroy; Feb 15th, 2025 at 01:12 PM.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Re: Looking for control that will allow me to create a html body for an email
Originally Posted by k_zeon
Hi, looking for a way to create text only that i can add to an email.
I would like it to be able to indent add bullet point colour fonts and colour background of fonts ( ie highlight)
does anyone know of a free control or usercontrol that would allow a type of word processor and then create html text
that i can save as a template when sending an email.
tks
WebBrowser with the ContentEditable or the MS DHTML Editor control thing that isn't recommended and actually is even older than WebBrowser's IE.
Re: Looking for control that will allow me to create a html body for an email
so, try ContentEditable WebBrowser. Can't believe none of you thought about it. It even has ways to bold out or italic out or even change font of a highlighted area. Perfect for writing.
Re: Looking for control that will allow me to create a html body for an email
Originally Posted by gaouser
so, try ContentEditable WebBrowser. Can't believe none of you thought about it. It even has ways to bold out or italic out or even change font of a highlighted area. Perfect for writing.
Code:
WebBrowser1.Document.body.designMode = "on"
(don't forget to load a blank page like about:blank before executing)
Re: Looking for control that will allow me to create a html body for an email
tks to all that replied. I will try to create a simple editor with webbrowser. Out of interest, does anyone know the execCommand to highlight text backcolour
also, if Olaf is listening , can the RC6 dll be used with Webview2 to do the same as the webbrowser control.
can you give me a basic starting point of how to do this. tks
Re: Looking for control that will allow me to create a html body for an email
Originally Posted by k_zeon
tks to all that replied. I will try to create a simple editor with webbrowser. Out of interest, does anyone know the execCommand to highlight text backcolour
also, if Olaf is listening , can the RC6 dll be used with Webview2 to do the same as the webbrowser control.
can you give me a basic starting point of how to do this. tks
I am not sure if Trident engine is that capable. CSS is worst nightmare of Trident.
as for WV2. You can set attribute contentEditable of body tag. but remember to remove it when uploading it!
Re: Looking for control that will allow me to create a html body for an email
We use TinyMCE where I work for this. We have a form that acts as a webview2 window from RC6 and load the js version of their editor. Its a pretty full featured WYSIWYG and has a free version. It makes it pretty easy for people who dont know html / css to make emails.
it puts a bullet point on the first line , but when i hit enter it starts a new paragraph and not bulleted.
If i however hold the Shift Key and press enter, it does goto next line and keeps the bullet alignment but does not create a new bullet point.
any help appreciated. tks
Last edited by k_zeon; Feb 18th, 2025 at 05:40 PM.
Re: Looking for control that will allow me to create a html body for an email
Btw, back in the day TinyMCE supported IE11 and we are still using version 4.1.3 (2014-07-29) hosted in a WebBrowser control to edit media content as HTML but it's far too complicated solution to post a snippet here so I'll post only a sample screenshot:
Note that this content editor is 100% JS based as used by WordPress.
Re: Looking for control that will allow me to create a html body for an email
tks. is this something that i could include in one of my projects.( how easy would it be) , can you adjust what buttons are displayed as would not need all of them.