Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 RTF to text

Author  Topic 

dupati1
Posting Yak Master

123 Posts

Posted - 2006-01-23 : 16:50:38
i am trying this function that i found online...

create function dbo.RTF2TXT(@in varchar(8000)) RETURNS  varchar(8000) AS 
BEGIN

DECLARE @object int
DECLARE @hr int
DECLARE @out varchar(8000)

-- Create an object that points to the SQL Server
EXEC @hr = sp_OACreate 'RICHTEXT.RichtextCtrl', @object OUT
EXEC @hr = sp_OASetProperty @object, 'TextRTF', @in
EXEC @hr = sp_OAGetProperty @object, 'Text', @out OUT
EXEC @hr = sp_OADestroy @object
return @out

END

select dbo.RTF2TXT('{\rtf1\ansi\ansicpg1252\uc1 aaa}')

and i am getting "Class not licensed to use error"...

any suggestions...

   

- Advertisement -