Exporting VB code to RTF or HTML format with Syntax Highlighting

This simple program enables you to export your VB code in color. Not many examples show how to color VB code into HTML highlighted text - his example shows how to export into both RTF and HTML formatted Text.

screen-shot

Simply open the code to export or paste it in the textbox.

If your aim is to convert it to rtf-format, first push the 'VB Colors' button. Then you save it using the right extension (rtf) or you select all, copy it and paste it in for instance Wordpad or Word.

If your aim is to convert it to html-format, just save it chosing the htm extension. The program will ask you to give a title for the html-page it generates.

The program relies upon a separate file, VBKeyW.txt , to provide all of the VB keywords - this could of course be hard-coded into the program.

 
 PROJECT NAME 
  	CodeExport_project.vbp
 
 ENVIRONMENT 
 	This is a VB5 project, which will run under Windows 9x.
 	(it is made under Windows 95b)
 	One extra control is used besides the basic VB-controls
 	namely, the Rich Text Box Control.
 
 YOU CAN LEARN 
 	to parse text into pieces-items
 	assemble html-pages on the fly
 	a minimal use of the Rich Text Box Control
 
 COPYRIGHT 
 	None. I made the code myself and everybody is free
 	to use it.
 
 RUNTIME FILES 
 	CodeExport.exe
 	CodeExpHlp.txt
 	VBKeyW.txt
 
 CODE FILES 
 	CodeExport.vbp/.vbw
 
 	frmCode.frm/.frx
 
 	CodeExp.bas
 	CD_File.bas
 

Download Zipped Project Files (28k)



Comments

  • Form to HTML in run-time

    Posted by Legacy on 06/26/2003 12:00am

    Originally posted by: Antonio Leitao

    Hi,

    I would like to know to create an HTML file based in information from a Form menu (with datagrid), in run-time. The idea it's to have a command bottom that will generate the HTML file in order to send it by e-mail.

    Reply
  • Converting VB Code To HTML

    Posted by Legacy on 12/30/2000 12:00am

    Originally posted by: Matt Cowan

    Thanks for this free code.
    This is very useful for writing up documentation helpfiles in HTML (in regards to commenting VB code), as well as for training purposes.

    Sincerely,
    Matt Cowan

    Reply
  • how to convert a vb form to rtf

    Posted by Legacy on 11/26/2000 12:00am

    Originally posted by: Ram Hachmon

    i am looking for a simple way (if there is any)
    
    to convert/export a vb form to an rtf format.

    the problem is that i create a form with lable on it with
    different colors and fonts and i need to convert this form
    to an rtf so i'll be able to open it with Word

    thank you
    Ram

    Reply
  • About Converting VB Form files to HTML

    Posted by Legacy on 08/30/2000 12:00am

    Originally posted by: Kiran MVSS

    The code which was written by you is very nice and i am appreciating you that you did an exellent job.

    But we want a tool or a program which will convert the VB Form controls to HTML form or in HTML code...

    If it is possible please tell me the site or mail to me

    Bye

    Regards

    Kiran

    Reply
  • Going to use it for office VBA

    Posted by Legacy on 08/18/2000 12:00am

    Originally posted by: Max Rottersman

    Will use this to colorize a system I have for saving Excel VBA modules in HTML. Very useful and well done. Thanks!

    Reply
  • RTF and VB

    Posted by Legacy on 04/27/2000 12:00am

    Originally posted by: Michael Neuhaus

    Thank you for providing the free code, explaining how to
    colorized vb code and convert it to rtf/html.

    Another thing I'm looking for is, a simple way to convert
    RTF to HTML.
    This should really be quite simple (?), but befor coding
    myself I'm now searching for some tools ....


    Does anybody know about something like that ?

    Regards,
    Michael Neuhaus

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • On-demand Event Event Date: September 10, 2014 Modern mobile applications connect systems-of-engagement (mobile apps) with systems-of-record (traditional IT) to deliver new and innovative business value. But the lifecycle for development of mobile apps is also new and different. Emerging trends in mobile development call for faster delivery of incremental features, coupled with feedback from the users of the app "in the wild." This loop of continuous delivery and continuous feedback is how the best mobile …

  • Webinar on September 23, 2014, 2 p.m. ET / 11 a.m. PT Mobile commerce presents an array of opportunities for any business -- from connecting with your customers through mobile apps to enriching operations with mobile enterprise solutions. Join guest speaker, Michael Facemire, Forrester Research, Inc. Principal Analyst, as he discusses the new demands of mobile engagement and how application program interfaces (APIs) play a crucial role. Check out this upcoming webinar to learn about the new set of …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds