is there a RTFToHTML() Function in Harbour ?

Post Reply
User avatar
Jimmy
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

is there a RTFToHTML() Function in Harbour ?

Post by Jimmy »

hi,

just a Question : is there a RTFToHTM() Function in Harbour :?:
greeting,
Jimmy
User avatar
karinha
Posts: 7885
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: is there a RTFToHTML() Function in Harbour ?

Post by karinha »

Jimmy wrote:hi,

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

http://www.pctoledo.com.br/forum/viewto ... 39&t=15459

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
Otto
Posts: 6380
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: is there a RTFToHTML() Function in Harbour ?

Post by Otto »

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: Select all | Expand



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: Select all | Expand

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.
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Jimmy
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: is there a RTFToHTML() Function in Harbour ?

Post by Jimmy »

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
User avatar
Otto
Posts: 6380
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: is there a RTFToHTML() Function in Harbour ?

Post by Otto »

RTFToHTM() open the RTF ans saveas HTML
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
Post Reply