Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Richtext license in Server 2003 - translating RTF into Plaintext

Hi,

It may sound very silly but here it goes...

I have a MSSQL/DTS package that has one of its transformation written in ActiveX VBScript.

In there, I am calling the Richtext box control to parse a RTF text so that I can extract the text minus the RTF codes. It works fine in my machine, as it has the Visual Studio IDE installed.

When I tried running the DTS both manually and via a scheduled job in my Windows 2003 Server (where my MS SQL server sits), it failed with the error message 'licence required'.

Tried to install VB Runtime SP4 in Server 2003, but it still return the same error. Can anyone help?

It may not be the best solution, thus is anyone know a better way of translating a RTF file into plain text, please suggest.

Here is the VBScript code that I use in DTS for one of the column transformation:

Function Main()
Dim rtf
Set rtf = CreateObject("RICHTEXT.RichtextCtrl.1")

rtf.TextRTF = cstr(DTSSource("Notes"))
DTSDestination("ExpNotes") = rtf.Text

set rtf = Nothing

Main = DTSTransformStat_OK
End Function

Thanks!
[1184 byte] By [mdk] at [2007-11-11 10:09:54]