mr_unreliable
Thu Apr 13 12:05:22 CDT 2006
Noel, you might try wordpad, which is nothing more than a
wrapper for the richedit control. It does have a progid
-- "Wordpad.Document.1" but afaik the only members are
"open", "print" and "printto", so you don't get access
to all the capabilities of the richedit control.
You might have better luck with msWord. It has an
automation interface (i.e., it's "scriptable"), and you
can colorize your text and background to your heart's
content.
Finally, as mayayana said, there are licensing "issues"
with richedit.
If you are looking for a wrapper for the richedit control
_for colorizing code_, then take a look at "Nathan's
CodeSense" (free).
(Saving the best for last), if you are looking for an actX
wrapper for microsoft's richedit control _that doesn't require
a license_, then take a look at Steve McMahon's (vbAccelerator)
richedit control, found here:
http://www.vbaccelerator.com/codelib/richedit/richedit.htm
Just to clarify things a bit, microsoft's richedit control
is the basis for vb's "richtext" control. That is, vb's
"richtext" control is a wrapper for richedit. Steve McMahon
also wrote up a wrapper for richedit, which he claims provides
more of the functionality of richedit than microsoft gives
you with the vb richtext control. You will have to judge that
claim for yourself, but in my opinion Steve's controls _are_
generally superior to microsoft's vb-version (i.e., in this
case the "RICHTX32.OCX" control).
Steve is offering all his controls for free, but than, you
still need a "form" to drop the control onto (i.e., serve as
a "host site" for the control).
cheers, jw
____________________________________________________________
You got questions? WE GOT ANSWERS!!! ..(but,
no guarantee the answers will be applicable to the questions)
noel wrote:
> Hello,
> I want to use Richtext.ocx from a vbs and i'm trying to do :
>
> Set oRichtext = WScript.CreateObject("RICHTEXT.RichtextCtrl.1")
> oRichtext.enabled = true
> oRichtext.TextRtf = "toto"
> oRichtext.Refresh
> MsgBox "coucou"
>
> But it doesn't work ! No error in compile, nor execution.
>
> What is wrong?
>