FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour is there a RTFToHTML() Function in Harbour ?
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
is there a RTFToHTML() Function in Harbour ?
Posted: Fri Sep 27, 2024 01:52 PM
hi,

just a Question : is there a RTFToHTM() Function in Harbour :?:
greeting,

Jimmy
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: is there a RTFToHTML() Function in Harbour ?
Posted: Fri Sep 27, 2024 03:20 PM
Jimmy wrote:hi,

just a Question : is there a RTFToHTM() Function in Harbour :?:
By Rochinha.

http://www.pctoledo.com.br/forum/viewtopic.php?f=39&t=15459

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: is there a RTFToHTML() Function in Harbour ?
Posted: Fri Sep 27, 2024 03:33 PM
Dear Jimmy,

Do you have Word installed?
Then you can open many formats with the Word object and save them in others.
Best regards,
Otto
Code (fw): Select all Collapse
oMail := oOutlook:CreateItemFromTemplate( Alltrim(  cFile ) )

   //olHTML    5  HTML format (.html) oMail:SaveAs  ( cZielVerzeichnis  + "\" + cFileNoExt(cVData) + "_fromEmail.html", 5  )
   oMail:SaveAs  ( cSaveAsRTFFile, 1  )

   oWord := CreateObject( "Word.Application" )

   oDoc := oWord:Documents:Open( cSaveAsRTFFile )
   oDoc:SaveAs( cSaveAsHTMLFile, 10 )
   oWord:Visible := .t.

   oWord:PrintOut()
   oDoc:Close()
   oWord:Quit()
In the Word object, there are several constants for different file formats when using the SaveAs method. The specific constant you need depends on the version of Word. Here are some commonly used constants for the SaveAs method:
Code (fw): Select all Collapse
wdFormatDocument: 0 - Saves as a Word document (.docx)
wdFormatRTF: 1 - Saves as an RTF file
wdFormatText: 2 - Saves as a text file (.txt)
wdFormatHTML: 10 - Saves as an HTML file (.html)
wdFormatXMLDocument: 12 - Saves as an XML document (.docx)
wdFormatPDF: 17 - Saves as a PDF file (.pdf)
wdFormatXPS: 18 - Saves as an XPS file (.xps)
These constants are typically defined in the Word namespace. You can use them to specify the corresponding formats in your SaveAs method.
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: is there a RTFToHTML() Function in Harbour ?
Posted: Fri Sep 27, 2024 05:07 PM
hi Otto
Otto wrote: Do you have Word installed?
Then you can open many formats with the Word object and save them in others.
i do not want to convert a RTF.
i got a Link from karinha and it seems what i´m searching
greeting,

Jimmy
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: is there a RTFToHTML() Function in Harbour ?
Posted: Fri Sep 27, 2024 05:18 PM

RTFToHTM() open the RTF ans saveas HTML

Continue the discussion