Link to home
Start Free TrialLog in
Avatar of RowdyOne078
RowdyOne078

asked on

RTF to TEXT in ActiveX dll.

What is a good way to convert a RTF document into plain text inside of an ActiveX VB Dll?

Thanks
Greg
Avatar of JMCrenshaw
JMCrenshaw

How complicatd is the RTF document. Does it make use of graphics, embedded images, tables etc.
Avatar of RowdyOne078

ASKER

it is a export from Crystal Reports 8.5 to RTF, so its wide open dependent on the reports.
ASKER CERTIFIED SOLUTION
Avatar of Dang123
Dang123

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You could use the RichText control, however it doesn't support a lot of the advanced or newer RTF commands and if the Crystal ouput uses those commands such as table and collums they would be ignored but you would get the text from it.

To do that you would need to place the control on a form, the Open the RTF File and output the data from the input command to the control. Once in the control you can use the Text property of the control that will return just the text part of the RTF.

This is a crude and messy way but it doesn't require the purchase of a third part tool.

Another way would be to look at using Word as a DDE server or via API calls, but this would requre the user to have Word installed.

Why not use Crstyal to Export to text instead ?
Crystal 8.5 has problems with exporting to plain text.  It cuts off fields and data.