Prev: Binary Data Readback
Next: Link Failed
From: Karl Wochele on 9 Dec 2009 02:51 John, you won't call the exe, you only need doxlib.dll. Here's a little class that should do anything you want: _DLL FUNCTION DoxConvert(cInFile AS PSZ,cOutFile AS PSZ,nOptions AS LONG) AS LONG PASCAL:doxlib._DoxConvert _DLL FUNCTION DoxStringConvert(cInput AS PSZ,nInLen AS LONG,cOutput AS PSZ,nOutLen AS LONG,nOptions AS LONG) AS LONG PASCAL:doxlib._DoxStringConvert DEFINE doc_rtf := 0 DEFINE doc_html := 1 DEFINE doc_text := 2 DEFINE doc_word := 3 DEFINE DOX_IN_HTML := (doc_html+1) DEFINE DOX_IN_RTF := (doc_rtf+1) DEFINE DOX_IN_TEXT := (doc_text+1) DEFINE DOX_OUT_HTML := ((doc_html+1)<<4) DEFINE DOX_OUT_RTF := ((doc_rtf+1)<<4) DEFINE DOX_OUT_TEXT := ((doc_text+1)<<4) CLASS RtfHtmTxt DECLARE METHOD rtf2html DECLARE METHOD rtf2text DECLARE METHOD text2rtf DECLARE METHOD text2html DECLARE METHOD html2rtf DECLARE METHOD html2text METHOD html2rtf(cHtm AS STRING) AS STRING PASCAL CLASS RtfHtmTxt LOCAL cRtf AS STRING LOCAL nLen AS LONG LOCAL pHtm AS PSZ LOCAL pRtf AS PSZ pHtm := StringAlloc(cHtm) nLen := DoxStringConvert(pHtm,LONG(PszLen(pHtm)),pRtf,0,DOX_IN_HTML+DOX_OUT_RTF) IF nLen <> 0 pRtf := MemAlloc(Abs(nLen)) nLen := DoxStringConvert(pHtm,LONG(PszLen(pHtm)),pRtf,nLen,DOX_IN_HTML+DOX_OUT_RTF) IF nLen <> 0 cRtf := Psz2String(pRtf) ENDIF MemFree(pRtf) ENDIF MemFree(pHtm) RETURN cRtf METHOD html2text(cHtm AS STRING) AS STRING PASCAL CLASS RtfHtmTxt LOCAL cTxt AS STRING LOCAL nLen AS LONG LOCAL pHtm AS PSZ LOCAL pTxt AS PSZ pHtm := StringAlloc(cHtm) nLen := DoxStringConvert(pHtm,LONG(PszLen(pHtm)),pTxt,0,DOX_IN_HTML+DOX_OUT_TEXT) IF nLen <> 0 pTxt := MemAlloc(Abs(nLen)) nLen := DoxStringConvert(pHtm,LONG(PszLen(pHtm)),pTxt,nLen,DOX_IN_HTML+DOX_OUT_TEXT) IF nLen <> 0 cTxt := Psz2String(pTxt) cTxt := StrTran(cTxt,_CHR(ASC_LF),CRLF) ENDIF MemFree(pTxt) ENDIF MemFree(pHtm) RETURN cTxt METHOD rtf2html(cRtf AS STRING) AS STRING PASCAL CLASS RtfHtmTxt LOCAL cHtm AS STRING LOCAL nLen AS LONG LOCAL pRtf AS PSZ LOCAL pHtm AS PSZ pRtf := StringAlloc(cRtf) nLen := DoxStringConvert(pRtf,LONG(PszLen(pRtf)),pHtm,0,DOX_IN_RTF+DOX_OUT_HTML) IF nLen <> 0 pHtm := MemAlloc(Abs(nLen)) nLen := DoxStringConvert(pRtf,LONG(PszLen(pRtf)),pHtm,nLen,DOX_IN_RTF+DOX_OUT_HTML) IF nLen <> 0 cHtm := Psz2String(pHtm) ENDIF MemFree(pHtm) ENDIF MemFree(pRtf) RETURN cHtm METHOD rtf2text(cRtf AS STRING) AS STRING PASCAL CLASS RtfHtmTxt LOCAL cTxt AS STRING LOCAL nLen AS LONG LOCAL pRtf AS PSZ LOCAL pTxt AS PSZ pRtf := StringAlloc(cRtf) nLen := DoxStringConvert(pRtf,LONG(PszLen(pRtf)),pTxt,0,DOX_IN_RTF+DOX_OUT_TEXT) IF nLen <> 0 pTxt := MemAlloc(Abs(nLen)) nLen := DoxStringConvert(pRtf,LONG(PszLen(pRtf)),pTxt,nLen,DOX_IN_RTF+DOX_OUT_TEXT) IF nLen <> 0 cTxt := Psz2String(pTxt) cTxt := StrTran(cTxt,_CHR(ASC_LF),CRLF) ENDIF MemFree(pTxt) ENDIF MemFree(pRtf) RETURN cTxt METHOD text2html(cTxt AS STRING) AS STRING PASCAL CLASS RtfHtmTxt LOCAL cHtm AS STRING LOCAL nLen AS LONG LOCAL pTxt AS PSZ LOCAL pHtm AS PSZ pTxt := StringAlloc(cTxt) nLen := DoxStringConvert(pTxt,LONG(PszLen(pTxt)),pHtm,0,DOX_IN_TEXT+DOX_OUT_HTML) IF nLen <> 0 pHtm := MemAlloc(Abs(nLen)) nLen := DoxStringConvert(pTxt,LONG(PszLen(pTxt)),pHtm,nLen,DOX_IN_TEXT+DOX_OUT_HTML) IF nLen <> 0 cHtm := Psz2String(pHtm) ENDIF MemFree(pHtm) ENDIF MemFree(pTxt) RETURN cHtm METHOD text2rtf(cTxt AS STRING) AS STRING PASCAL CLASS RtfHtmTxt LOCAL cRtf AS STRING LOCAL nLen AS LONG LOCAL pTxt AS PSZ LOCAL pRtf AS PSZ pTxt := StringAlloc(cTxt) nLen := DoxStringConvert(pTxt,LONG(PszLen(pTxt)),pRtf,0,DOX_IN_TEXT+DOX_OUT_RTF) IF nLen <> 0 pRtf := MemAlloc(Abs(nLen)) nLen := DoxStringConvert(pTxt,LONG(PszLen(pTxt)),pRtf,nLen,DOX_IN_TEXT+DOX_OUT_RTF) IF nLen <> 0 cRtf := Psz2String(pRtf) ENDIF MemFree(pRtf) ENDIF MemFree(pTxt) RETURN cRtf Karl John Martens schrieb: > Karl, > > Thanks for the link. I only need the basics of markup so that won't be a > problem. > > I would expect DoxStringConvert(cInput AS PSZ,nOptions AS LONG) AS PSZ > to be the call. > What's the nInLen and nOutLen for ? > Do you have a VO line where you call the EXE ? > > Does the EXE show when calling it ? > > Cheers, > John > > > Karl Wochele schreef: >> Hi John, >> >> you can have a look at >> http://www.docfrac.net/index.php >> >> it doesn't respect all formatting, but it works to a certain degree. >> >> You will need: >> >> _DLL FUNCTION DoxConvert(cInFile AS PSZ,cOutFile AS PSZ,nOptions AS >> LONG) AS LONG PASCAL:doxlib._DoxConvert >> _DLL FUNCTION DoxStringConvert(cInput AS PSZ,nInLen AS LONG,cOutput AS >> PSZ,nOutLen AS LONG,nOptions AS LONG) AS LONG >> PASCAL:doxlib._DoxStringConvert >> >> DEFINE doc_rtf := 0 >> DEFINE doc_html := 1 >> DEFINE doc_text := 2 >> DEFINE doc_word := 3 >> DEFINE DOX_IN_HTML := (doc_html+1) >> DEFINE DOX_IN_RTF := (doc_rtf+1) >> DEFINE DOX_IN_TEXT := (doc_text+1) >> DEFINE DOX_OUT_HTML := ((doc_html+1)<<4) >> DEFINE DOX_OUT_RTF := ((doc_rtf+1)<<4) >> DEFINE DOX_OUT_TEXT := ((doc_text+1)<<4) >> >> >> >> HTH >> Karl >> >> John Martens schrieb: >>> Did anyone make a class to convert rtf (or .doc) to HTML ? >>> >>> I would like to show formatted text on a HTML page which is entered >>> in a VO rtf control. >>> >>> John
From: John Martens on 9 Dec 2009 07:00 Karl, Thanks. It look pretty complete. I''ll give it a try. Cheers, John Karl Wochele schreef: > John, > > you won't call the exe, you only need doxlib.dll. Here's a little class > that should do anything you want: > > _DLL FUNCTION DoxConvert(cInFile AS PSZ,cOutFile AS PSZ,nOptions AS > LONG) AS LONG PASCAL:doxlib._DoxConvert > _DLL FUNCTION DoxStringConvert(cInput AS PSZ,nInLen AS LONG,cOutput AS > PSZ,nOutLen AS LONG,nOptions AS LONG) AS LONG > PASCAL:doxlib._DoxStringConvert > > DEFINE doc_rtf := 0 > DEFINE doc_html := 1 > DEFINE doc_text := 2 > DEFINE doc_word := 3 > DEFINE DOX_IN_HTML := (doc_html+1) > DEFINE DOX_IN_RTF := (doc_rtf+1) > DEFINE DOX_IN_TEXT := (doc_text+1) > DEFINE DOX_OUT_HTML := ((doc_html+1)<<4) > DEFINE DOX_OUT_RTF := ((doc_rtf+1)<<4) > DEFINE DOX_OUT_TEXT := ((doc_text+1)<<4) > > CLASS RtfHtmTxt > > DECLARE METHOD rtf2html > DECLARE METHOD rtf2text > DECLARE METHOD text2rtf > DECLARE METHOD text2html > DECLARE METHOD html2rtf > DECLARE METHOD html2text > METHOD html2rtf(cHtm AS STRING) AS STRING PASCAL CLASS RtfHtmTxt > LOCAL cRtf AS STRING > LOCAL nLen AS LONG > LOCAL pHtm AS PSZ > LOCAL pRtf AS PSZ > > pHtm := StringAlloc(cHtm) > > nLen := > DoxStringConvert(pHtm,LONG(PszLen(pHtm)),pRtf,0,DOX_IN_HTML+DOX_OUT_RTF) > IF nLen <> 0 > pRtf := MemAlloc(Abs(nLen)) > nLen := > DoxStringConvert(pHtm,LONG(PszLen(pHtm)),pRtf,nLen,DOX_IN_HTML+DOX_OUT_RTF) > IF nLen <> 0 > cRtf := Psz2String(pRtf) > ENDIF > MemFree(pRtf) > ENDIF > > MemFree(pHtm) > > RETURN cRtf > METHOD html2text(cHtm AS STRING) AS STRING PASCAL CLASS RtfHtmTxt > LOCAL cTxt AS STRING > LOCAL nLen AS LONG > LOCAL pHtm AS PSZ > LOCAL pTxt AS PSZ > > pHtm := StringAlloc(cHtm) > > nLen := > DoxStringConvert(pHtm,LONG(PszLen(pHtm)),pTxt,0,DOX_IN_HTML+DOX_OUT_TEXT) > IF nLen <> 0 > pTxt := MemAlloc(Abs(nLen)) > nLen := > DoxStringConvert(pHtm,LONG(PszLen(pHtm)),pTxt,nLen,DOX_IN_HTML+DOX_OUT_TEXT) > > IF nLen <> 0 > cTxt := Psz2String(pTxt) > cTxt := StrTran(cTxt,_CHR(ASC_LF),CRLF) > ENDIF > MemFree(pTxt) > ENDIF > > MemFree(pHtm) > > RETURN cTxt > METHOD rtf2html(cRtf AS STRING) AS STRING PASCAL CLASS RtfHtmTxt > LOCAL cHtm AS STRING > LOCAL nLen AS LONG > LOCAL pRtf AS PSZ > LOCAL pHtm AS PSZ > > pRtf := StringAlloc(cRtf) > > nLen := > DoxStringConvert(pRtf,LONG(PszLen(pRtf)),pHtm,0,DOX_IN_RTF+DOX_OUT_HTML) > IF nLen <> 0 > pHtm := MemAlloc(Abs(nLen)) > nLen := > DoxStringConvert(pRtf,LONG(PszLen(pRtf)),pHtm,nLen,DOX_IN_RTF+DOX_OUT_HTML) > IF nLen <> 0 > cHtm := Psz2String(pHtm) > ENDIF > MemFree(pHtm) > ENDIF > > MemFree(pRtf) > > RETURN cHtm > METHOD rtf2text(cRtf AS STRING) AS STRING PASCAL CLASS RtfHtmTxt > LOCAL cTxt AS STRING > LOCAL nLen AS LONG > LOCAL pRtf AS PSZ > LOCAL pTxt AS PSZ > > pRtf := StringAlloc(cRtf) > > nLen := > DoxStringConvert(pRtf,LONG(PszLen(pRtf)),pTxt,0,DOX_IN_RTF+DOX_OUT_TEXT) > IF nLen <> 0 > pTxt := MemAlloc(Abs(nLen)) > nLen := > DoxStringConvert(pRtf,LONG(PszLen(pRtf)),pTxt,nLen,DOX_IN_RTF+DOX_OUT_TEXT) > IF nLen <> 0 > cTxt := Psz2String(pTxt) > cTxt := StrTran(cTxt,_CHR(ASC_LF),CRLF) > ENDIF > MemFree(pTxt) > ENDIF > > MemFree(pRtf) > > RETURN cTxt > METHOD text2html(cTxt AS STRING) AS STRING PASCAL CLASS RtfHtmTxt > LOCAL cHtm AS STRING > LOCAL nLen AS LONG > LOCAL pTxt AS PSZ > LOCAL pHtm AS PSZ > > pTxt := StringAlloc(cTxt) > > nLen := > DoxStringConvert(pTxt,LONG(PszLen(pTxt)),pHtm,0,DOX_IN_TEXT+DOX_OUT_HTML) > IF nLen <> 0 > pHtm := MemAlloc(Abs(nLen)) > nLen := > DoxStringConvert(pTxt,LONG(PszLen(pTxt)),pHtm,nLen,DOX_IN_TEXT+DOX_OUT_HTML) > > IF nLen <> 0 > cHtm := Psz2String(pHtm) > ENDIF > MemFree(pHtm) > ENDIF > > MemFree(pTxt) > > RETURN cHtm > METHOD text2rtf(cTxt AS STRING) AS STRING PASCAL CLASS RtfHtmTxt > LOCAL cRtf AS STRING > LOCAL nLen AS LONG > LOCAL pTxt AS PSZ > LOCAL pRtf AS PSZ > > pTxt := StringAlloc(cTxt) > > nLen := > DoxStringConvert(pTxt,LONG(PszLen(pTxt)),pRtf,0,DOX_IN_TEXT+DOX_OUT_RTF) > IF nLen <> 0 > pRtf := MemAlloc(Abs(nLen)) > nLen := > DoxStringConvert(pTxt,LONG(PszLen(pTxt)),pRtf,nLen,DOX_IN_TEXT+DOX_OUT_RTF) > IF nLen <> 0 > cRtf := Psz2String(pRtf) > ENDIF > MemFree(pRtf) > ENDIF > > MemFree(pTxt) > > RETURN cRtf > > Karl > > > > John Martens schrieb: >> Karl, >> >> Thanks for the link. I only need the basics of markup so that won't be >> a problem. >> >> I would expect DoxStringConvert(cInput AS PSZ,nOptions AS LONG) AS PSZ >> to be the call. >> What's the nInLen and nOutLen for ? >> Do you have a VO line where you call the EXE ? >> >> Does the EXE show when calling it ? >> >> Cheers, >> John >> >> >> Karl Wochele schreef: >>> Hi John, >>> >>> you can have a look at >>> http://www.docfrac.net/index.php >>> >>> it doesn't respect all formatting, but it works to a certain degree. >>> >>> You will need: >>> >>> _DLL FUNCTION DoxConvert(cInFile AS PSZ,cOutFile AS PSZ,nOptions AS >>> LONG) AS LONG PASCAL:doxlib._DoxConvert >>> _DLL FUNCTION DoxStringConvert(cInput AS PSZ,nInLen AS LONG,cOutput >>> AS PSZ,nOutLen AS LONG,nOptions AS LONG) AS LONG >>> PASCAL:doxlib._DoxStringConvert >>> >>> DEFINE doc_rtf := 0 >>> DEFINE doc_html := 1 >>> DEFINE doc_text := 2 >>> DEFINE doc_word := 3 >>> DEFINE DOX_IN_HTML := (doc_html+1) >>> DEFINE DOX_IN_RTF := (doc_rtf+1) >>> DEFINE DOX_IN_TEXT := (doc_text+1) >>> DEFINE DOX_OUT_HTML := ((doc_html+1)<<4) >>> DEFINE DOX_OUT_RTF := ((doc_rtf+1)<<4) >>> DEFINE DOX_OUT_TEXT := ((doc_text+1)<<4) >>> >>> >>> >>> HTH >>> Karl >>> >>> John Martens schrieb: >>>> Did anyone make a class to convert rtf (or .doc) to HTML ? >>>> >>>> I would like to show formatted text on a HTML page which is entered >>>> in a VO rtf control. >>>> >>>> John
From: John Martens on 9 Dec 2009 15:11
Karl, I've done my first test and it works pretty fine. The RTF conversion is indeed pretty basic. Newlines/bold/italic/colors works fine but eg center/fonts/numbered listst does nog work. Thanks for the code. John Karl Wochele schreef: > John, > > you won't call the exe, you only need doxlib.dll. Here's a little class > that should do anything you want: > > _DLL FUNCTION DoxConvert(cInFile AS PSZ,cOutFile AS PSZ,nOptions AS > LONG) AS LONG PASCAL:doxlib._DoxConvert > _DLL FUNCTION DoxStringConvert(cInput AS PSZ,nInLen AS LONG,cOutput AS > PSZ,nOutLen AS LONG,nOptions AS LONG) AS LONG > PASCAL:doxlib._DoxStringConvert > > DEFINE doc_rtf := 0 > DEFINE doc_html := 1 > DEFINE doc_text := 2 > DEFINE doc_word := 3 > DEFINE DOX_IN_HTML := (doc_html+1) > DEFINE DOX_IN_RTF := (doc_rtf+1) > DEFINE DOX_IN_TEXT := (doc_text+1) > DEFINE DOX_OUT_HTML := ((doc_html+1)<<4) > DEFINE DOX_OUT_RTF := ((doc_rtf+1)<<4) > DEFINE DOX_OUT_TEXT := ((doc_text+1)<<4) > > CLASS RtfHtmTxt > > DECLARE METHOD rtf2html > DECLARE METHOD rtf2text > DECLARE METHOD text2rtf > DECLARE METHOD text2html > DECLARE METHOD html2rtf > DECLARE METHOD html2text > METHOD html2rtf(cHtm AS STRING) AS STRING PASCAL CLASS RtfHtmTxt > LOCAL cRtf AS STRING > LOCAL nLen AS LONG > LOCAL pHtm AS PSZ > LOCAL pRtf AS PSZ > > pHtm := StringAlloc(cHtm) > > nLen := > DoxStringConvert(pHtm,LONG(PszLen(pHtm)),pRtf,0,DOX_IN_HTML+DOX_OUT_RTF) > IF nLen <> 0 > pRtf := MemAlloc(Abs(nLen)) > nLen := > DoxStringConvert(pHtm,LONG(PszLen(pHtm)),pRtf,nLen,DOX_IN_HTML+DOX_OUT_RTF) > IF nLen <> 0 > cRtf := Psz2String(pRtf) > ENDIF > MemFree(pRtf) > ENDIF > > MemFree(pHtm) > > RETURN cRtf > METHOD html2text(cHtm AS STRING) AS STRING PASCAL CLASS RtfHtmTxt > LOCAL cTxt AS STRING > LOCAL nLen AS LONG > LOCAL pHtm AS PSZ > LOCAL pTxt AS PSZ > > pHtm := StringAlloc(cHtm) > > nLen := > DoxStringConvert(pHtm,LONG(PszLen(pHtm)),pTxt,0,DOX_IN_HTML+DOX_OUT_TEXT) > IF nLen <> 0 > pTxt := MemAlloc(Abs(nLen)) > nLen := > DoxStringConvert(pHtm,LONG(PszLen(pHtm)),pTxt,nLen,DOX_IN_HTML+DOX_OUT_TEXT) > > IF nLen <> 0 > cTxt := Psz2String(pTxt) > cTxt := StrTran(cTxt,_CHR(ASC_LF),CRLF) > ENDIF > MemFree(pTxt) > ENDIF > > MemFree(pHtm) > > RETURN cTxt > METHOD rtf2html(cRtf AS STRING) AS STRING PASCAL CLASS RtfHtmTxt > LOCAL cHtm AS STRING > LOCAL nLen AS LONG > LOCAL pRtf AS PSZ > LOCAL pHtm AS PSZ > > pRtf := StringAlloc(cRtf) > > nLen := > DoxStringConvert(pRtf,LONG(PszLen(pRtf)),pHtm,0,DOX_IN_RTF+DOX_OUT_HTML) > IF nLen <> 0 > pHtm := MemAlloc(Abs(nLen)) > nLen := > DoxStringConvert(pRtf,LONG(PszLen(pRtf)),pHtm,nLen,DOX_IN_RTF+DOX_OUT_HTML) > IF nLen <> 0 > cHtm := Psz2String(pHtm) > ENDIF > MemFree(pHtm) > ENDIF > > MemFree(pRtf) > > RETURN cHtm > METHOD rtf2text(cRtf AS STRING) AS STRING PASCAL CLASS RtfHtmTxt > LOCAL cTxt AS STRING > LOCAL nLen AS LONG > LOCAL pRtf AS PSZ > LOCAL pTxt AS PSZ > > pRtf := StringAlloc(cRtf) > > nLen := > DoxStringConvert(pRtf,LONG(PszLen(pRtf)),pTxt,0,DOX_IN_RTF+DOX_OUT_TEXT) > IF nLen <> 0 > pTxt := MemAlloc(Abs(nLen)) > nLen := > DoxStringConvert(pRtf,LONG(PszLen(pRtf)),pTxt,nLen,DOX_IN_RTF+DOX_OUT_TEXT) > IF nLen <> 0 > cTxt := Psz2String(pTxt) > cTxt := StrTran(cTxt,_CHR(ASC_LF),CRLF) > ENDIF > MemFree(pTxt) > ENDIF > > MemFree(pRtf) > > RETURN cTxt > METHOD text2html(cTxt AS STRING) AS STRING PASCAL CLASS RtfHtmTxt > LOCAL cHtm AS STRING > LOCAL nLen AS LONG > LOCAL pTxt AS PSZ > LOCAL pHtm AS PSZ > > pTxt := StringAlloc(cTxt) > > nLen := > DoxStringConvert(pTxt,LONG(PszLen(pTxt)),pHtm,0,DOX_IN_TEXT+DOX_OUT_HTML) > IF nLen <> 0 > pHtm := MemAlloc(Abs(nLen)) > nLen := > DoxStringConvert(pTxt,LONG(PszLen(pTxt)),pHtm,nLen,DOX_IN_TEXT+DOX_OUT_HTML) > > IF nLen <> 0 > cHtm := Psz2String(pHtm) > ENDIF > MemFree(pHtm) > ENDIF > > MemFree(pTxt) > > RETURN cHtm > METHOD text2rtf(cTxt AS STRING) AS STRING PASCAL CLASS RtfHtmTxt > LOCAL cRtf AS STRING > LOCAL nLen AS LONG > LOCAL pTxt AS PSZ > LOCAL pRtf AS PSZ > > pTxt := StringAlloc(cTxt) > > nLen := > DoxStringConvert(pTxt,LONG(PszLen(pTxt)),pRtf,0,DOX_IN_TEXT+DOX_OUT_RTF) > IF nLen <> 0 > pRtf := MemAlloc(Abs(nLen)) > nLen := > DoxStringConvert(pTxt,LONG(PszLen(pTxt)),pRtf,nLen,DOX_IN_TEXT+DOX_OUT_RTF) > IF nLen <> 0 > cRtf := Psz2String(pRtf) > ENDIF > MemFree(pRtf) > ENDIF > > MemFree(pTxt) > > RETURN cRtf > > Karl > > > > John Martens schrieb: >> Karl, >> >> Thanks for the link. I only need the basics of markup so that won't be >> a problem. >> >> I would expect DoxStringConvert(cInput AS PSZ,nOptions AS LONG) AS PSZ >> to be the call. >> What's the nInLen and nOutLen for ? >> Do you have a VO line where you call the EXE ? >> >> Does the EXE show when calling it ? >> >> Cheers, >> John >> >> >> Karl Wochele schreef: >>> Hi John, >>> >>> you can have a look at >>> http://www.docfrac.net/index.php >>> >>> it doesn't respect all formatting, but it works to a certain degree. >>> >>> You will need: >>> >>> _DLL FUNCTION DoxConvert(cInFile AS PSZ,cOutFile AS PSZ,nOptions AS >>> LONG) AS LONG PASCAL:doxlib._DoxConvert >>> _DLL FUNCTION DoxStringConvert(cInput AS PSZ,nInLen AS LONG,cOutput >>> AS PSZ,nOutLen AS LONG,nOptions AS LONG) AS LONG >>> PASCAL:doxlib._DoxStringConvert >>> >>> DEFINE doc_rtf := 0 >>> DEFINE doc_html := 1 >>> DEFINE doc_text := 2 >>> DEFINE doc_word := 3 >>> DEFINE DOX_IN_HTML := (doc_html+1) >>> DEFINE DOX_IN_RTF := (doc_rtf+1) >>> DEFINE DOX_IN_TEXT := (doc_text+1) >>> DEFINE DOX_OUT_HTML := ((doc_html+1)<<4) >>> DEFINE DOX_OUT_RTF := ((doc_rtf+1)<<4) >>> DEFINE DOX_OUT_TEXT := ((doc_text+1)<<4) >>> >>> >>> >>> HTH >>> Karl >>> >>> John Martens schrieb: >>>> Did anyone make a class to convert rtf (or .doc) to HTML ? >>>> >>>> I would like to show formatted text on a HTML page which is entered >>>> in a VO rtf control. >>>> >>>> John |