Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Why do some scripts from version 9 not run in version 11?

I have a very nice pair of functions that run great in version 9, but will only return null value when I run them under version 11?  Does anyone have any ideas?

Here are the scripts.  They are used in the load script to convert RTF Blobs to Text and I call them as:

LOAD

     ....    

     RTF2Text(BLOBTEXT(Blob Field)) as [Text Results]

FUNCTION BLOBTOTEXT(blob)

    txt_str = ""

    FOR c = 1 to (LEN(blob)-4) step 4

        hx = mid(blob,c,2)

        dc = CLng("&H" & hx)

        tc = Chr(dc)

        txt_str = txt_str & tc

    NEXT

    BLOBTOTEXT = txt_str

END FUNCTION

Function RTF2Text(input)

Dim out

Dim rtf

Set rtf = CreateObject("RICHTEXT.RichtextCtrl.1")

rtf.TextRTF = input

out = rtf.Text

set rtf = nothing

RTF2Text = out

End Function

0 Replies