Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rtf file

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
hi,

i am creating a web site using asp. There i need to create rtf files very often. but when i use the following script

<%
set objFSO = Server.CreateObject(&quot;Scripting.FileSystemObject&quot;)
set objTStream = objFSO.CreateTextFile(&quot;c:\NewFold\test1.rtf&quot;,true,true)
objTStream.WriteLine &quot;At last i can create files with vbscript&quot;
objTStream.WriteLine
objTStream.WriteLine &quot;Here are thee blank lines : &quot;
objTStream.WriteLine
objTStream.WriteLine &quot;Here are thee blank linesasdf : &quot;
objTStream.WriteLine
objTStream.WriteLine &quot;Here are thee blank linesasdf : &quot;
objTStream.WriteBlankLines 3
objTStream.WriteLine &quot;....... and this is &quot;
objTStream.WriteLine &quot;Thank you, this is shiva &quot;
objTStream.close
%>

even it is saving under .rtf extension but not actually in rtf format only saving as text format.

if you help me how to sava a file in rtf format i will very much thankful to you

thank you,

shiva
 
Shiva,
You need to change the MIME type of your document to the RTF format. This is why it is still text even with the RTF extension. I'm not exactly sure how to do that, but I know it can be done. I'd search around for examples of how to change a MIME type of a file to another MIME type.

Harold Blackorby
hblackorby@scoreinteractive.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top