EasyByte Software

Welcome to EasyByte Software

Home Buy Online Products Downloads Support
ASP and dotNET
Further Information



FileToString Method

RTF-2-HTML v8 User Guide


FileToString Method

This is the method that you would use to get the contents of a file into a string. Perfect for use with the other RTF-2-HTML methods.



Converts an file to a string


x = object.FileToString(filename as string)

The syntax of the FileToString method has these parts:

Part Description
object An RTF-2-HTML v8 control.
x A string that becomes the result of the method running. 
filename  The Method accepts one parameter, filename, this is the fully qualified file to read in. You must specify the full path of the file including directory it is located in.

Remarks You must specify the full path of the file including directory it is located in.


Example Sample Visual Basic Code to read in a file and use it to set the RTF_Text property of RTF-2-HTML.

Where rtf2html1 is an instance of an RTF-2-HTML.

rtf2html1.HTML_Colour = "white"
rtf2html1.HTML_Title = "my title"
rtf2html1.CleanRTF = "yes"
rtf2html1.CleanHTML = "no"
rtf2html1.XHTMLOutput = "no"
rtf2html1.Links = "yes"
rtf2html1.DoDebug = "yes"
rtf2html1.ConvertImages = "yes"
rtf2html1.ImageFolder = "c:\"
rtf2html1.ImageFormat = "jpg"

rtf2html1.RTF_Text = rtf2html1.FileToString("c:\directory\file.rtf")

rtf2.Text = rtf2html1.ConvertRTF





Back to Contents Page


Click here to set this great site as your home page

Or click here to add it to your Favorites.


Copyright (c) EasyByte Software 2007, info@easybyte.com